Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Average of an Average 2

Status
Not open for further replies.

Rougy

Programmer
Oct 15, 2001
249
US
Hi,

This might be off topic, but I was hoping some of the math majors out there would know it.

We have to average SCC counts per farm at this plant.

When I take an average of all SCC counts for a given set of criteria, the number is 268.

But the department that I'm writing the program for is averaging all of the averages, and getting a number of 252.

This is driving me crazy.

They still want to average all of the averages, but that is not a true average of the SCC count.

Is there a mathematical name for an average of an average?

-----
The death of dogma is the birth of reason.
 
Can't be sure but lets try a test case

Farm# Count SCC SCC Average
1 10 2555 255.5
2 20 4822 241.1

But the Overall average can be computed one of two ways

(Sum of Averages) / (Number of Farms) = (496.6/2) = 248.3

Or (more correctly)

(Sum of SCC) / (Sum Of Count) = (7377/30) = 245.9

Could this be the problem? (I don't think that there's a name for an average for averages.)
 
The average of all SCC counts will NOT equal the average of Farm averages, because they are two different things. I'll try to explain why by continuing with Golom's sample data.

For Farm 1, you have 10 counts, totaling 2555, so each indiviudal count contributes 1/10 towards the average of Farm 1.

For Farm 2, you have 20 counts, totaling 4822, so each indivdual count contributes 1/20 towards the average of Farm 2.

If you average all the individual counts, you will have 30 counts, totaling 7377, with each indiviudal count contributing 1/30 towards this overall average.

That's pretty straight forward. Now let's see why this is different between averaging the two averages. By averageing these two averages, you have 2 counts, totally 7377 with each one contributing 1/2 towards this average. Now remember that Farm 1 has ten invidual counts which make the first 1/2 of the overall average, and Farm 2 has 20 invidual counts which determine the second 1/2 of the overall average. So in this case, each count of Farm 1 will contribute 1/20 towards the average of averages (1/10 * 1/2), and Farm 2 counts will contribute 1/40 towards the average of averages (1/20 * 1/2). Not at all the same as each count contributing an equal share of 1/30 each.

That being said, both are valid calcuations, but they mean two entirely different things. Changing the term "count" to "plot", if you want to know the average production across all of the plots, then take the average of all 30 plots. If you want to know the average production of all Farms, then average the averages. Two different things, two different values.

As to which is right in your case, don't know enough about the application to answer.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
CajunCenturion

Of course they are not the same thing! That was the point of the example. I was just trying to determine if Roughy and his departmental bretheren are getting different results because they have two different views of what constitutes an "average of averages".
 
Rougy,

What may be correct (or more accurate) for you and your department will really depend on what you are trying to accomplish.

Try and explains us what you are doing, and also how you are calculating, and at the same time ask the guys from the department how they are calculating the averages themselves.

(and just to clarify me what is SCC?)



Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Is there a mathematical name for an average of an average?

Garbage.

An average (in this case, the arithmetic mean) is an attempt to summarize a collection of statistical data points. The summary itself cannot be considered a data point, so the results of further summarization are specious.

See or, if you want a denser discussion, try mathworld.wolfram.com.
 
The terms weighted average and simple average are sometimes used to distinguish the calculation, with weighted average being the value used by 'professional' organizations.




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Michael,

That's a nice way of spinning it.

If one wants to calculate a weighted mean, he should consciously assign a weight to each data point. From the description of the circumstances, the application of weighting here seems accidental and arbitrary. (Let's see, do the data points from farm A really count less than the data points from farm B? And so on.) Moreover, in different periods of time, it seems that the weights could change, all unbeknownst to the "statisticians." There's madness in the method. :)

Regards,
David
 
It would be nice to know if Rougy even took the time to read any of the responses.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Hi All,

Yes, I'm reading them right now. Just got back to the office, Monday morning.

My QC man wants the average of all farms, which is the average of the average. I guess that's the way they've been doing it and that's the way they want to keep it.

I pointed out that it was not the same as the true average, but he said it's close enough for what we're doing.

It was very kind of all of you to help out with this question.

-----
The death of dogma is the birth of reason.
 
Frederic,

SCC is somatic cell count. A somatic cell is a white blood cell. The higher the count indicates a sicker group of cows and inferior milk.

SCC is what causes milk to spoil. It goes up every time the milk leaves a non-refrigerated place. So if you open your fridge, pour the milk into your cereal or coffee, and put the milk right back into the fridge, it will last longer than if you take it out and set it on your table.



-----
The death of dogma is the birth of reason.
 
that's the way they've been doing it and that's the way they want to keep it.

And here's why it's wrong:

Current statistics show that Farm A has the healthiest cows (lowest SCC.) Management therefore decides to concentrate the healthiest cows at Farm A, and transports the ten healthiest cows from the rest of the farms to Farm A.

At the next reporting period, to everyone's surprise, the overall SCC (the "average of the average") rises. Why? Did the cows' health plummet? No: the healthiest cows no longer count as much as they did before they moved to Farm A. The cows with the higher SCC now are given more weight in the "average of the average."

Oh, well, at least now I know why "the old cow path" is a metaphor for "that's the way we've always done it."

--harebrain
 
Harebrain,

I couldn't agree more, but what's a guy to do? It's not my call.

FYI, cows are never migrated from Farm A to Farm B.

Farm A might have 4,000 cows, and Farm B might have 50, and those numbers pretty much stay the same (until Farm B inevitably goes out of business). :(

Thanks.

-----
The death of dogma is the birth of reason.
 
Rougy,

As a "professional", it is your duty / responsability to inform and educate the organization of errornous practices. Wheather a SPECIFIC example illustrating the fallacy of the current practicew is applicable to your situation is not relevant. In particular, where public health and saftey are concerned, generating and diseminating erronous information may well be a legal liability. You should take EVERY opportunity to formally note discrepancies between the 'current practice' and the 'correct way'.




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Michael,

As a professional, I agree with you totally.

-----
The death of dogma is the birth of reason.
 
Rougy,

To illuminate my previous post and add to what Michael said, the practice you've described can be ascribed to either ignorance of proper statistical methods, or to deliberate manipulation of the outcome. It's most likely the former, but ignorance is no excuse especially now that you've enlightened your employer.

So cows might never migrate from farm to farm, but who's to say that someone couldn't create "paper farms," pooling the cattle in a manner most advantageous to the statistics? This is not to be construed as an accusation, but sinister things have been done elsewhere to enhance the bottom line.

--harebrain
 
harebrain,

The SCC is just one factor. The "weighted average" of all farms isn't really relevant, but they include it on all the reports anyway.

There's no way I'm going to tell the QA guy, who's been doing this for five years with the blessing of the state inspector, and who's been in the dairy business as a manager for a few years prior to that, how he should write his reports.

What's most relevant is the SCC count on a "per load" basis, which can't be faked. It's a pass or fail test.

When we look at averages by farm, what we're trying to do is figure out which farms to buy from the most because they're the cleanest, and which ones we have to encourage to do a better job in the hygiene department.

There are other factors too, coli counts being one of the more significant.

I don't know if you've ever been on a dairy farm or in a processing plant (which is where I work), but it's not Ma and Pa Kettle anymore. Everything's stainless steel. The filtering processes are patented and trade secrets. We're talking a multi-million dollar business, lawyers, R&D people, marketers, the whole shebang.

Even though I disagree with my QA man about the "Grand Total Average," it's really more of an indicator or a guideline than it is a number upon which decisions are made.

It just bothered me because I'm relatively new to this business and I have an perfectionist streak.

Thanks again for your input.

-----
The death of dogma is the birth of reason.
 
Rougy,

Thanks for the info.

Regarding you situation, IF you really feal uncomfortable, I would suggest taking all the information you can from the last years, speak with someone you know that has a very good working knowledge of statistics (preferably someone with a maths degree AND hands on experience on stats), and go through the data, comparing it to the averages they got using their method.
If after this you find that some decisions were made that should not have, then speak with your superior and point out clearly what was wrong, why and how to fix it.
If the divergencies are small enough and are such that didn't affect the outcome then just leave it as it is.




Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top