Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 IV. Random Variables PBAF 527 Winter 2005. 2 Learning Objectives 1.Distinguish Between the Two Types of Random Variables 2.Discrete Random Variables.

Similar presentations


Presentation on theme: "1 IV. Random Variables PBAF 527 Winter 2005. 2 Learning Objectives 1.Distinguish Between the Two Types of Random Variables 2.Discrete Random Variables."— Presentation transcript:

1 1 IV. Random Variables PBAF 527 Winter 2005

2 2 Learning Objectives 1.Distinguish Between the Two Types of Random Variables 2.Discrete Random Variables 1. Describe Discrete Random Variables 2. Compute the Expected Value & Variance of Discrete Random Variables 3.Continuous Random Variables 1. Describe Normal Random Variables 2. Introduce the Normal Distribution 3. Calculate Probabilities for Continuous Random Variables 4.Assessing Normality

3 3 Random Variables A variable defined by the probabilities of each possible value in the population.A variable defined by the probabilities of each possible value in the population.

4 4 Data Types

5 5 Types of Random Variables Discrete Random Variable Whole Number (0, 1, 2, 3 etc.) Whole Number (0, 1, 2, 3 etc.) Countable, Finite Number of Values Countable, Finite Number of Values Jump from one value to the next and cannot take any values in between. Jump from one value to the next and cannot take any values in between. Continuous Random Variables Whole or Fractional Number Whole or Fractional Number Obtained by Measuring Obtained by Measuring Infinite Number of Values in Interval Infinite Number of Values in Interval Too Many to List Like Discrete Variable Too Many to List Like Discrete Variable

6 6 Discrete Random Variable Examples ExperimentRandom Variable Possible Values Children of One Gender in Family # Girls 0, 1, 2,..., 10? Answer 33 Questions # Correct 0, 1, 2,..., 33 Count Cars at Toll Between 11:00 & 1:00 # Cars Arriving 0, 1, 2,...,  Open Check in Lines # Open 0, 1, 2,..., 8

7 7 Discrete Probability Distribution 1.List of All possible [x, p(x)] pairs x = Value of Random Variable (Outcome) x = Value of Random Variable (Outcome) p(x) = Probability Associated with Value p(x) = Probability Associated with Value 2.Mutually Exclusive (No Overlap) 3.Collectively Exhaustive (Nothing Left Out) 4. 0  p(x)  1 5.  p(x) = 1

8 8 Marilyn says: It may sound strange, but more families of 4 children have 3 of one gender and one of the other than any other combination. Explain this. Construct a sample space and look at the total number of ways each event can occur out of the total number of combinations that can occur, and calculate frequencies. Sample Space BBBB GBBB BGBB BBGB BBBG GGBB GBGB GBBG BGGB BGBG BBGG BGGG GBGG GGBG GGGB GGGG Are all 16 combinations equally likely? Is the sex of each child independent of the other three?Are all 16 combinations equally likely? Is the sex of each child independent of the other three? If you have a family of four, what is the probability of…If you have a family of four, what is the probability of… P(all girls or all boys) = P(all girls or all boys) = P (2 boys, 2 girls)= P(3 boys, 1 girl or 3 girls, 2 boy)=

9 9 What is the probability of exactly 3 girls in 4 kids? What is the probability of at least 3 girls in 4 kids? Assume the random variable X represents the number of girls in a family of 4 kids. (lower case x is a particular value of X, ie: x=3 girls in the family) Sample Space BBBB GBBB BGBB BBGB BBBG GGBB GBGB GBBG BGGB BGBG BBGG BGGG GBGG GGBG GGGB GGGG Random Variable X x=0 x=1 x=1 x=1 x=1 x=2 x=2 x=2 x=2 x=2 x=2 x=3 x=3 x=3 x=3 x=4 Number of Girls, x Probability, P(x) 01/16 14/16 26/16 34/16 41/16 Total16/16=1.00

10 10 Visualizing Discrete Probability Distributions ListingTable Number of Girls, x Probability, P(x) 01/16 14/16 26/16 34/16 41/16 Total16/16=1.00 {(0,1/16), (1,.25), (2,3/8),(3,.25),(4,1/16) } Graph X is random and x is fixed. We can calculate the probability that different values of X will occur and make a probability distribution.

11 11 Probability Distributions Probability distributions can be written as probability histograms. Cumulative probabilities: Adding up probabilities of a range of values.

12 12 Washington State Population Survey and Random Variables A telephone survey of households throughout Washington State. But some households don’t have phones. number of telephones,x P(x) 00.03500 10.70553 20.21769 30.02966 40.00775 50.00332 60.00088 70.00002 80.00000 90.00015 Total1.00000

13 13 Probabilities about Telephone in Washington State What is the probability that a household will have no telephone?What is the probability that a household will have no telephone? What is the probability that a household will have 2 or more telephone lines?What is the probability that a household will have 2 or more telephone lines? What is the probability that a household will have 2 to 4 phone lines?What is the probability that a household will have 2 to 4 phone lines? What is the probability a household will have no phone lines or more than 4 phone lines?What is the probability a household will have no phone lines or more than 4 phone lines? Who do you think is in that 3.5% of the population?Who do you think is in that 3.5% of the population? What are the implications of this for the quality of the survey?What are the implications of this for the quality of the survey?

14 14 Probability Histogram of Telephone Lines, 1998

15 15 1.Expected Value Mean of Probability Distribution Mean of Probability Distribution Weighted Average of All Possible Values Weighted Average of All Possible Values  = E(X) =  x p(x)  = E(X) =  x p(x) 2.Variance Weighted Average Squared Deviation about Mean Weighted Average Squared Deviation about Mean  2 = V(X)= E[ (x    (x    p(x)  2 = V(X)= E[ (x    (x    p(x)  2 = V(X)=E(X   E(X     2 = V(X)=E(X   E(X    3.Standard Deviation  2 = SD(X)   2 = SD(X)  Summary Measures Sigma -squared mu

16 16 What is the average number of telephones in Washington Households and how much does size vary from the average? # of Phones Approach 1: Variance Approach 2: Variance xFrequencyP(x)xP(x) (x-  ) (x-  ) 2 (x-  ) 2 P(x) x2x2x2x2 x 2 P(x) 0 198,286 198,2860.040.00-1.31.650.0600.00 1 4,142,030 4,142,0300.710.71-0.30.080.0610.71 2 1,278,026 1,278,0260.220.440.70.510.1140.87 3 174,110 174,1100.030.091.72.940.0990.27 4 45,499 45,4990.010.032.77.380.06160.12 5 19,473 19,4730.000.023.713.810.05250.08 6 5,170 5,1700.000.014.722.240.02360.03 7 118 1180.000.005.732.670.00490.00 8 -0.000.006.745.100.00640.00 9 897 8970.000.007.759.530.01810.01 Sum5,863,6091.00  =1.28 32.16  2 =0.45 2.10

17 17 Cherbyshev’s Rule and Empirical Rule for a Discrete Random Variable Let x be a discrete random variable with a probability distribution p(x), mean , and standard deviation . Then, depending on the shape of p(x), the following probability statements can be made: Chebyshev’s Rule Applies to any probability distribution (eg: telephones in Washington State) Empirical Rule Applies to probability distributions that are mound-shaped and symmetric (eg: girls born of 4 children) P(  -  < x <  +  ) 0000 .68 P(  - 2  < x <  + 2  )  3/4 .95 P(  - 3  < x <  + 3  )  8/9  1.00

18 18 Data Types

19 19 Continuous Random Variable A variable with many possible values at all intervalsA variable with many possible values at all intervals

20 20 Continuous Random Variable Examples ExperimentRandom Variable Possible Values Weigh 100 People Weight 45.1, 78,... Measure Part Life Hours 900, 875.9,... Ask Food Spending Spending 54.12, 42,... Measure Time Between Arrivals Inter-Arrival Time 0, 1.3, 2.78,...

21 21 Continuous Probability Density Function 1.Mathematical Formula 2.Shows All Values, x, & Frequencies, f(x) f(X) Is Not Probability f(X) Is Not Probability 3.Properties Area under curve sums to 1 Area under curve sums to 1 Can add up areas of function to get probability less than a specific value Can add up areas of function to get probability less than a specific value Value (Value, Frequency) Frequency f(x) ab x

22 22 Continuous Random Variable Probability Probability Is Area Under Curve! © 1984-1994 T/Maker Co. Pcxd() f(x) X cd

23 23 Continuous Probability Distribution Models

24 24 Importance of Normal Distribution 1.Describes Many Random Processes or Continuous Phenomena 2.Can Be Used to Approximate Discrete Probability Distributions Example: Binomial Example: Binomial 3.Basis for Classical Statistical Inference

25 25 Normal Distribution 1.‘Bell-Shaped’ & Symmetrical 2.Mean, Median, Mode Are Equal 3.‘Middle Spread’ Is 1.33  4.Random Variable Has Infinite Range Mean Median Mode

26 26 Normal Distribution Useful Properties About half of “weight” below mean (because symmetrical)About half of “weight” below mean (because symmetrical) About 68% of probability within 1 standard deviation of mean (at change in curve)About 68% of probability within 1 standard deviation of mean (at change in curve) About 95% of probability within 2 standard deviationsAbout 95% of probability within 2 standard deviations More than 99% of probability within 3 standard deviationsMore than 99% of probability within 3 standard deviations Mean Median Mode

27 27 Probability Density Function x=Value of Random Variable (-  < x <  )  =Population Standard Deviation  =3.14159 e = 2.71828  =Mean of Random Variable x Don’t memorize this!

28 28 Notation X is N(μ,σ) The random variable X has a normal distribution (N) with mean μ and standard deviation σ. X is N(40,1) X is N(10,5) X is N(50,3)

29 29 Effect of Varying Parameters (  &  )

30 30 Normal Distribution Probability Probability is area under curve! ?

31 31 Infinite Number of Tables Normal distributions differ by mean & standard deviation. Each distribution would require its own table. That’s an infinite number!

32 32 Standardize the Normal Distribution One table! Normal Distribution Standardized Normal Distribution Z is N(0,1)

33 33 Standardizing Example Normal Distribution Standardized Normal Distribution

34 34 Obtaining the Probability.0478.0478.02 0.1.0478 Standardized Normal Probability Table (Portion) ProbabilitiesProbabilities Shaded area exaggerated

35 35 Example P(3.8  X  5) Normal Distribution.0478 Standardized Normal Distribution Shaded area exaggerated

36 36 Example P(2.9  X  7.1) Normal Distribution.1664.1664.0832.0832 Standardized Normal Distribution Shaded area exaggerated

37 37 Example P( X  8) Normal Distribution Standardized Normal Distribution.1179.1179.5000.3821.3821 Shaded area exaggerated

38 38 Example P(7.1  X  8) Normal Distribution.0832.1179.0347.0347 Standardized Normal Distribution Shaded area exaggerated

39 39 Travel Time and the Normal Distribution To help people plan their travel, WSDOT estimates that average trip from Seattle to Bellevue at 5:40 pm (at peak) takes 11 minutes and with a standard deviation of 10. They also believe this travel time approximates a normal distribution. What proportion of trips take less than 27 minutes?

40 40 Process 1.Draw a picture and write down the probability you need. 2.Convert probability to standard scores. 3.Find cumulative probability in the table.

41 41 More Travel Time Suppose we have only 10-15 minutes to travel to Seattle from Bellevue. What proportion of trips will make it in that time? Since normal curves are symmetrical: 19.5% of trips will make it in between 10 and 15 minutes.

42 42 Finding Z Values for Known Probabilities.1217.1217.01 0.3.1217 Standardized Normal Probability Table (Portion) What is Z given P(Z) =.1217? Shaded area exaggerated

43 43 Finding X Values for Known Probabilities Normal Distribution Standardized Normal Distribution.1217.1217 Shaded areas exaggerated

44 44 Travel Times Take 3 How much time will the trip take 99% of the time?

45 45 Finding Z Values for Known Probabilities 1.Write down probability statement and draw a picture P(Z<____)=.99 2.Look up Z value in table P(Z<_____)=.99 3.Convert Z value (SD units) to variable (X) by using mean and SD. X=μ+Zσ so X=11+(_____)(10)=

46 46 Assessing Normality 1.A histogram of the data is mound shaped and symmetrical about the mean. 2.Determine the percentage of measurements falling in each of the intervals x  s, x  2s, and x  3s. If the data are approximately normal, the percentages will be approximately equal to 68%, 95%, and 100% respectively. 3.Find the interquartile range, IQR, and standard deviation, s, for the sample, then calculate the ratio IQR/s. If the data are approximately normal, then IQR/S  1.3. 4.Construct a normal probability plot for the data. If the data are approximately normal, the points will fall (approximately) on a straight line.

47 47 Assessing Normality: Is Class Height Normally Distributed? 1.How does the histogram look? SPSS can produce the line of the normal curve for you. In SPSS select GRAPH, HISTOGRAM. After you choose the variable you want, click on the box “Display Normal Curve” and you’ll get something that looks like this.

48 48 Assessing Normality: Is Class Height Normally Distributed? Anticipated Percent Actual Percent x±s [63.40,69.64]68%43% x±2s [60.29,72.75]95%96% x±3s [57.17,75.87]100%100% 2. Compute the intervals: SPSS: ANALYZE, DESCRIPTIVE STATISTICS, FREQUENCIES

49 49 Assessing Normality: Is Class Height Normally Distributed? 3. Does IQR/s≈1.3? IQR=69-64=5IQR/s=5/3.117=1.6 SPSS: ANALYZE, DESCRIPTIVE STATISTICS, FREQUENCIES then click on STATISTICS and choose the ones you want.

50 50 Assessing Normality: Is Class Height Normally Distributed? 4. What does the normal probability plot look like? SPSS: Graphs>Q-Q Test distribution is normal and click estimate distribution parameters from data.

51 51 Learning Objectives 1.Distinguish Between the Two Types of Random Variables 2.Discrete Random Variables 1. Describe Discrete Random Variables 2. Compute the Expected Value & Variance of Discrete Random Variables 3.Continuous Random Variables 1. Describe Normal Random Variables 2. Introduce the Normal Distribution 3. Calculate Probabilities for Continuous Random Variables 4.Assessing Normality


Download ppt "1 IV. Random Variables PBAF 527 Winter 2005. 2 Learning Objectives 1.Distinguish Between the Two Types of Random Variables 2.Discrete Random Variables."

Similar presentations


Ads by Google