• Status: Solved
• Priority: Medium
• Security: Public
• Views: 562

# 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:
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
0
ExpExchHelp
• 4
• 3
1 Solution

Commented:
It has been a little while since I did StdDev and Variance of Frequency distributions.
But the attached has an attempt by me, but the values are not exactly the same as yours.
I think they are pretty close to the required calculations though.
Formulas.xlsx
0

Author Commented:
The_Barman:

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

Again, thank you so much for your assistance.

EEH
0

Author Commented:
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
0

Commented:
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 :)
0

Author Commented:
The_Barman:

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

EEH
0

Commented:
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
0

Author Commented:
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
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.