# Homework Help: Find the mean and variance of this set of 40 numbers

1. Sep 28, 2010

### jinx007

A computer can generate random numbers which are either 0 or 2. On a particular occasion, it
generates a set of numbers which consists of 23 zeros and 17 twos. Find the mean and variance of this set of 40 numbers.

Please help i just don't know where to start. In fact i am thinking of using the formula mean = np but i cannot relate it to the question.

According to the booklet the answer for the mean is 0.850 and variance = 0.978

2. Sep 28, 2010

### gerben

Re: Statistic

For the mean: just add up all the numbers (that is the 23 zeros and the 17 twos) and divide through the amount of numbers that you have added up.

For the variance: use the formula Variance(X)= Mean( (X - mean(X))^2 ), so for each number calculate (X- mean(X))^2, add these all up and divide though the amount of numbers you have added up

3. Sep 29, 2010

### jinx007

Re: Statistic

Oh if i understand you, you are saying that i must add 17 and 23 which is equal to 40 then i divide by 40.. ??? but the answer is not correct, or i have misinterpreted you..??

If i know how to find the mean i can work out the variance. Just help me to find the mean.!!

4. Sep 29, 2010

### gerben

Re: Statistic

add up 17 twos and 23 zeros and divide by 40