**Unformatted text preview:**

10/20/09 Lecture 14 1STOR 155 Introductory Statistics(Chap 5)Lecture 14: Sampling Distributions for Counts and ProportionsThe UNIVERSITY of NORTH CAROLINAat CHAPEL HILL10/20/09 Lecture 14 2Statistic & Its Sampling Distribution• A statistic is any numeric measure calculated from data. It is a random variable, its value varies from sample to sample. – count/proportion:• Ex: number/proportion of free throws made by a Tar Heel player who shoots 20 free throws in a practice– sample mean• Ex: average SAT score of a group of 10 students randomly selected from STAT 155• The probability distribution of a statistic is called its sampling distribution. – It depends on the population distribution, and the sample size.10/20/09 Lecture 14 3Binomial Experiment• n trials (with n fixed in advance). • Each trial has two possible outcomes, “success” (S) and “failure” (F). • The probability of success, p, remains the same from one trial to the next. • The trials are independent, i.e. the outcome of each trial does not affect outcomes of other trials.10/20/09 Lecture 14 4Example• The experiment: randomly draw n balls withreplacement from an urn containing 10 red balls and 20 black balls. • Let S represent {drawing a red ball} and F represent {drawing a black ball}. • Then this is a binomial experiment with p =1/3.• Q: Would it still be a binomial experiment if the balls were drawn without replacement? No!10/20/09 Lecture 14 5Binomial Distribution10/20/09 Lecture 14 6Do they follow binomial distributions (approximately) ?• X = number of stocks on the NY stock exchange whose prices increase today• X = number of games the Tar Heel will win next season• A couple decides to have children until they have a girl. X = number of boys the couple will haveAnswer: NO in all 3 cases. Why ?10/20/09 Lecture 14 7Binomial Distribution• If X ~ B(n, p), then X= np, 2X= np(1-p).• P(X=x) depends on n and p, which can be calculated using software or Table C (for some n and p), or a Binomial Formula (page 329)--- a simple argument given in class …10/20/09 Lecture 14 8•Binomial Table: for n 20, and certain values of p. •Table C: Page T-610/20/09 Lecture 14 9Credit Card Example• Records show that 5% of the customers in a shoe store make their payments using a credit card.• This morning 8 customers purchased shoes. • Use the binomial table to answer the following questions.1. Find the probability that exactly 6 customers did not use a credit card.– X: number of customers who did not use a credit card. Then X ~ B(8, 0.95), which is not on the table.– Y: number of customers who did use a credit card. Then Y ~ B(8, 0.05), which is on the table.– P(X= 6) = P(Y = 2) = .0515.2. What is the probability that at least 3 customers used a credit card? (See the board …)10/20/09 Lecture 14 103. What is the expected number of customers who used a credit card?–Y= np = 8(.05) = 0.4.4. What is the standard deviation of the number of customers who used a credit card?– 2Y= np (1 – p) = 8(. 05)(.95) = 0.38.The standard deviation is.62.038.0 YCredit Card Example (continued)10/20/09 Lecture 14 11Parking Example (bad impact ?)• Sarah drives to work everyday, but does not own a parking permit. She decides to take her chances and risk getting a parking ticket each day. Suppose – A parking permit for a week (5 days) cost $ 30. – A parking fine costs $ 50. – The probability of getting a parking ticket each day is 0.1. – Her chances of getting a ticket each day is independent of other days. – She can get only 1 ticket per day.• What is her probability of getting at least 1 parking ticket in one week (5 days)?• What is the expected number of parking tickets that Sarah will get per week?• Is she better off paying the parking permit in the long run?10/20/09 Lecture 14 12Sample Proportion• If X ~ B(n, p), the sample proportion is defined as• mean & variance of a sample proportion:./)1( ,ˆˆnppppp.size samplesuccesses of #ˆnXp10/20/09 Lecture 14 13Example: Clinton's vote• 43% of the population voted for Clinton in 1992. • Suppose we survey a sample of size 2300 and see if they voted for Clinton or not in 1992.• We are interested in the sampling distribution of the sample proportion , for samples of size 2300. • What's the mean and variance of ?pˆpˆ10/20/09 Lecture 14 14Count & Proportion of “Success”• A Tar Heel basketball player is a 95% free throw shooter.• Suppose he will shoot 5 free throws during each practice.• X: number of free throws he makes in a practice.• : proportion of free throws made during practice.• P(X=3) = P( =0.6). Why ?pˆpˆ10/20/09 Lecture 14 1510/20/09 Lecture 14 16Normal Approximation for Counts and Proportions• Let X ~ B(n, p) and• If n is large, then• Rule of Thumb: np 10, n(1 - p) 10../ˆnXp )./)1( ,( approx. is ˆ))1( ,( approx. is n-pppNp-pnpnpNX10/20/09 Lecture 14 17Switches Inspection• A quality engineer selects an SRS of 100 switches from a large shipment for detailed inspection. • Unknown to the engineer, 10% of the switches in the shipment fail to meet the specifications. • Software tells us that the actual probability that no more than 9 of the switches in the sample fail inspection is P(X 9) = 0.4513. • What will the normal approximation say?10/20/09 Lecture 14 1810/20/09 Lecture 14 19Switches Inspection• The normal approximation to the probability of no more than 9 bad switches is the area to the left of X = 9 under the normal curve.• Using Table A, we have• The approximation .3707 to the binomial probability of .4513 is not very accurate. In this case np = 10..3707.)33.()3109310()9( ZPXPXP.3)9)(.1(.100)1( ,10)1)(.100( pnpnpXX10/20/09 Lecture 14 2010/20/09 Lecture 14 21Continuity Correction• The normal approximation is more accurate if we consider X=9 to extend from 8.5 to 9.5, X = 10 to extend from 9.5 to 10.5, and so on. • Example (Cont.):.4325.)17.( )3105.9310()5.9()9(ZPXPXPXP10/20/09 Lecture 14 22P(X 8) replaced by P(X < 8.5)For large n the effects of the continuity correction factor is very small and will be omitted.P(X 14) replaced by P(X > 13.5)Continuity CorrectionP(X < 8) = P(X<=7) replaced by P(X < 7.5)10/20/09 Lecture 14 23Coin Tossing Example• Toss a fair coin 200 times, what

View Full Document