Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Statistics MATH-1410 Mean and Standard Deviation of Discrete Random Variables Refer to exercise #13 on page 232. We will use a frequency distribution to construct a probability distribution and then find the mean and standard deviation of a discrete random variable. A survey asked 200 households how many televisions they owned. The results are shown below. Televisions Households 0 3 1 38 2 83 3 52 4 18 5 5 6 1 Before we get going, understand that we can already use the given information to make statements about the households in the survey. A few examples are listed below. 38 of the 200 households in the survey owned exactly one television. 1 of the 200 households owned exactly six televisions. 124 of the 200 households owned no more than two televisions. We will let X (the variable of interest) represent the number of televisions per household. Since X has a finite number of possible values, we know it is a discrete random variable. Let’s use the frequency distribution to build the probability distribution of X. Recall: A probability distribution is a table that lists all possible values of the random variable and their corresponding probabilities. x = number of televisions 0 1 2 3 4 5 6 P( X = x ) Note: P( X = x ) represents the probability that our random variable X will be equal to x. It may help to see this in context. If we picked one of the households at random, P( X = 3 ) represents the probability that that household owns exactly 3 televisions. P( X > 4 ) represents the probability that the selected household owns more than 4 televisions. P( X ≤ 2 ) represents the probability that the selected household owns at most 2 televisions. Each entry in the second column represents a probability. x = number of televisions 0 P( X = x ) P( X = 0 ) 1 P( X = 1 ) 2 P( X = 2 ) 3 P( X = 3 ) 4 P( X = 4 ) 5 P( X = 5 ) 6 P( X = 6 ) To find P( X = 0 ), we take the number of households that owned no televisions and divide by the total number of households surveyed. Since 3 of the 200 households surveyed owned no televisions, we have P( X = 0 ) = 3/200 = 0.015. To find P( X = 1 ), we divide 38 by 200 and get 0.190. The rest of the probabilities are found in a similar manner. x = number of televisions 0 P( X = x ) 0.015 1 0.190 2 0.415 3 0.260 4 0.090 5 0.025 6 0.005 Again, we can make statements using the table: If one of the 200 households is selected at random, there is a 19% chance that it will own exactly one television, a 0.5% chance that it will own exactly six televisions, and a 62% chance that it will own no more than two televisions. We can now use the completed probability distribution to determine the mean (or the expected value) of the random variable. We are fortunate in this problem since we have access to the raw data. We know, for example, that there were 38 households with exactly one television. Whenever we have raw data or at least a grouped frequency distribution, we can apply the methods from chapter 2 to determine the mean. We will use those methods first and then go back and re-calculate the mean using the ideas presented in chapter 4. To find the mean of any data set, we add all the data items and then divide by the total number of data items. If we are dealing with sample data, we would use: X = sum of all data items ∑x = number of data items in the sample n And if we are analyzing population data, we would use: µ= sum of all data items ∑x = N number of data items in the population We will treat the set of 200 households as our population of interest. To find the average number of televisions per household, we have: = 0 ( 3 ) + 1 ( 38 ) + 2 ( 83 ) + 3 ( 52 ) + 4 (18 ) + 5 ( 5 ) + 6 (1) 200 3 38 83 52 18 5 1 = 0 + 1 + 2 + 3 + 4 + 5 + 6 200 200 200 200 200 200 200 = 2.315 ≈ 2.3 Ok, we probably wouldn’t have done it this way in chapter 2. However, I’ve broken things down this way for a reason. In chapter 4, we are told we can find the mean of any discrete random variable by using the formula µ = ∑ x ⋅ P ( X = x ) . How is this possible? Let’s take a closer look at the sum above: 3 38 83 52 18 5 1 0 + 1 + 2 + 3 + 4 + 5 + 6 200 200 200 200 200 200 200 3 3 The first entry 0 should look familiar. We used 3/200 to find P ( X = 0 ) . So, 0 is the 200 200 38 same as 0 ⋅ P ( X = 0 ) . The second entry 1 is the same as 1 ⋅ P ( X = 1) . 200 Using these ideas, we can re-express the sum 3 38 83 52 18 5 1 0 + 1 + 2 + 3 + 4 + 5 + 6 200 200 200 200 200 200 200 as 0 ⋅ P ( X = 0) + 1 ⋅ P ( X = 1) + 2 ⋅ P ( X = 2) + 3 ⋅ P ( X = 3) + 4 ⋅ P ( X = 4) + 5 ⋅ P ( X = 5) + 6 ⋅ P ( X = 6) We can condense this expression using summation notation: 0 ⋅ P ( X = 0) + 1 ⋅ P ( X = 1) + 2 ⋅ P ( X = 2) + 3 ⋅ P ( X = 3) + 4 ⋅ P ( X = 4) + 5 ⋅ P ( X = 5) + 6 ⋅ P ( X = 6) 6 = ∑ x ⋅ P ( X = x ) i i or simply i =0 ∑ x ⋅ P ( X = x ) where it is understood that x goes from 0 to 6. So, from this point forward, we can find the mean of any discrete random variable using the formula: µ = ∑ x ⋅ P ( X = x ) To find the mean of our random variable, we add one column to our probability distribution and then calculate the product x ⋅ P ( X = x ) for each possible value of x. The results are stored in the cells of our new column and then added. The sum represents the mean of our variable. x = number of televisions 0 P( X = x ) x·P(X = x ) 0.015 0 1 0.190 0.190 2 0.415 0.830 3 0.260 0.780 4 0.090 0.360 5 0.025 0.125 6 0.005 0.030 2.315 The last entry in the third column tells us there are approximately 2.3 televisions in every household. Suppose we want the standard deviation of our random variable. The author of our text likes to use the ‘defining’ formula: σ= ∑ ( x − µ ) 2 ⋅ P ( X = x ) I prefer to use the ‘computing’ formula: σ= ∑ x 2 ⋅ P ( X = x ) − µ 2 **********If you do not want to see a proof, skip this section!!********** To prove these two formulas are equal, we need show that the radicands are equivalent. In other 2 words, we need to prove that ∑ ( x − µ ) ⋅ P ( X = x ) is equivalent to ∑ x 2 ⋅ P ( X = x ) − µ 2 . Before we begin, we need to remember a few things: ∑ P ( X = x) = 1 Fact 1 ∑ x ⋅ P ( X = x ) = µ Fact 2 µ is a constant Fact 3 The first expression says the sum of all our probabilities must equal 1. This is one of the two conditions every probability distribution must satisfy. The second expression is what we use to find the mean of any discrete random variable. The third fact reminds us that the mean is simply a number. ∑ ( x − µ ) ⋅ P ( X = x ) . We will ignore the summation symbol for a moment. Inside the brackets, we see a binomial raised to the second power. Let’s expand that term using FOIL: We will start by working with (x − µ) 2 2 = ( x − µ )( x − µ ) = x 2 − 2 x µ + µ 2 or x 2 − 2 µ x + µ 2 So now we have: (x − µ) 2 ⋅ P ( X = x ) = ( x 2 − 2µ x + µ 2 ) ⋅ P ( X = x ) We’ll treat P ( X = x ) as another term. We know from Algebra that if we are dealing with the product of a term (or monomial) and a polynomial, we are allowed to distribute that term across the polynomial. For example, if we have 5 y ( y 2 − 3 y + 4 ) , we can use the distributive property to rewrite it as 5 y 3 − 15 y 2 + 20 y . In our case, we will distribute P ( X = x ) across our sum: (x 2 − 2 µ x + µ 2 ) ⋅ P ( X = x ) = x 2 ⋅ P( X = x) − 2µ x ⋅ P ( X = x) + µ 2 ⋅ P ( X = x) Now we’ll bring the summation notation back into play: Note: if you are unfamiliar with series arithmetic and summation notation, you may have to do a little research on the following properties: n n ∑ cx i i =1 = c ∑ xi for any real constant c Property 1 i =1 n ∑(x i i =1 n n i =1 i =1 + yi ) = ∑ xi + ∑ yi Property 2 Here we go! ∑ ( x − µ ) 2 ⋅ P ( X = x ) = ∑ x = ∑ x 2 2 = ∑ x 2 ⋅ P ( X = x ) − 2 µ x ⋅ P ( X = x ) + µ 2 ⋅ P ( X = x ) ⋅ P ( X = x ) − ∑ [ 2 µ x ⋅ P ( X = x ) ] + ∑ µ 2 ⋅ P ( X = x ) Property 2 ⋅ P ( X = x ) − 2 µ ∑ [ x ⋅ P ( X = x ) ] + µ 2 ∑ [ P ( X = x ) ] Property 1 and Fact 3 = ∑ x = ∑ x 2 2 ⋅ P ( X = x ) − 2 µ ⋅ ( µ ) + µ 2 ⋅ (1) Fact 2 and Fact 1 ⋅ P ( X = x ) − 2 µ 2 + µ 2 Algebra (exponent rule) = Since ∑ x ∑ ( x − µ ) σ= 2 2 ⋅ P ( X = x ) − µ 2 Algebra (combined like terms) ⋅ P ( X = x ) is equivalent to ∑ ( x − µ ) 2 ⋅ P ( X = x ) = ∑ x ∑ x 2 2 ⋅ P ( X = x ) − µ 2 , we have established that ⋅ P ( X = x ) − µ 2 ************************************************************************ At this stage, we are ready to calculate the standard deviation of our random variable. In the computing formula, we need terms of the form x 2 ⋅ P ( X = x ) . Therefore, we add two more columns to our table to help with our intermediate work. x = number of televisions 0 P( X = x ) x·P(X = x ) 0.015 0 1 0.190 0.190 2 0.415 0.830 3 0.260 0.780 4 0.090 0.360 5 0.025 0.125 6 0.005 0.030 x2 x2·P(X = x ) 2.315 And now we will fill in the new columns: x = number of televisions 0 P( X = x ) x·P(X = x ) x2 x2·P(X = x ) 0.015 0 0 0 1 0.190 0.190 1 0.190 2 0.415 0.830 4 1.66 3 0.260 0.780 9 2.34 4 0.090 0.360 16 1.44 5 0.025 0.125 25 0.625 6 0.005 0.030 36 0.18 2.315 6.435 We need to remember that 6.435 is not the standard deviation. It is a number we use to determine the standard deviation. Finally, we have: σ= ∑ x 2 ⋅ P ( X = x ) − µ 2 = 6.435 − ( 2.315 ) = 1.075775 = 1.037195739 ≈ 1.0 2 Conclusion: On average, there are approximately 2.3 televisions per household with a standard deviation of about 1 television.