Link to home
Start Free TrialLog in
Avatar of ExpExchHelp
ExpExchHelpFlag for United States of America

asked on

Mean, StdDev, and Variance (for subset of data)

I need some help with computing (in Excel) the mean, standard deviation, and variance.

Trick is that some survey answers have not been selected (e.g., value of 0) and thus must be skipped.

For example, the following data set must provide the following answers:
Answer ID:      Number of Responses
1                       0
2                       0
3                       1
4                       3
5                       0
6                       0
7                       1

Average = 4.40
StDev = 1.52
Variance = 2.30

Again, given that zeros must be ignored, what are the proper Excel functions for each of these three statistics?

Thanks,
EEH
ASKER CERTIFIED SOLUTION
Avatar of Steve
Steve
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ExpExchHelp

ASKER

The_Barman:

Thousand thanks... as I only need two decimals, your numbers match a 100%.

Again, thank you so much for your assistance.

EEH
The_Barman:

Again, thanks for your help... quick follow-up.

When I used a few other frequency distribution, their StDev and Variance did not match though.

Example #1:

Score      Frequency
1      1
2      0
3      0
4      1
5      0
6      1
7      0

The survey's tool value equal:  
Mean                        3.67
Standard Dev.      2.52
Variance                        6.33

The Excel formula's (your XLS) result in:
Average      3.67
StdDev      0.86
Variance      0.74

*****************************

Example #2:

Score      Frequency
1      0
2      2
3      2
4      0
5      1
6      0
7      0

The survey's tool value equal:  
Mean                        3.00
Standard Dev.      1.22
Variance                        1.50

The Excel formula's (your XLS) result in:
Average      3.00
StdDev      1.63
Variance      2.67


So, for some strange reason, the original dataset I provided resulted in the same values.   The next two or three frequency distribution, however, resulted in different values.

Any ideas what might be causing this?

Thanks,
EEH
There will likely be something in the order of the formula (braket in wrong place etc)
I will read my book again and should be able to sort it :)
The_Barman:

Thanks so much... I truly appreciate it!!

EEH
OK, I have taken the time to actually make 100% on this one...

The actual values your servey tool is giving for Variance and Standard deviation are for an n-1 standard deviation of a sample rather than population.

In Excel there are two functions Stdev.P and Stdev.S
One uses N as the divisor one uses N-1 as a better approximation of true standard deviation.

I have provided the formula and excel method for both in the attached file.
Some would argue that N is correct others N-1.
I will leave it up to you.

ATB
Steve.
Formulas.xlsx
Steve:

Absolutely fantastic... that is awesome.  

Thank you for providing both solutions for either approach... besides, I really like the presentation/visual in the XLS.

Again, thousand thanks!!!

EEH