Upcoming SlideShare
×

# Confidence intervals

2,332 views

Published on

Published in: Education, Technology
1 Comment
4 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• very nice,,,,,,,easly i can understand,,,,,,,,,,

Are you sure you want to  Yes  No
Your message goes here
Views
Total views
2,332
On SlideShare
0
From Embeds
0
Number of Embeds
32
Actions
Shares
0
156
1
Likes
4
Embeds 0
No embeds

No notes for slide
• Y1: normalpdf(x) Y2: tpdf(x,2) Y3:tpdf(x,5) use the -0 Change Y3:tpdf(x,30) Window: x = [-4,4] scl =1 Y=[0,.5] scl =1
• ### Confidence intervals

1. 1. ConfidenceIntervals
2. 2. Rate your confidenceRate your confidence0 - 1000 - 100• Guess my age within 10 years?• within 5 years?• within 1 year?• Shooting a basketball at a wading pool, willmake basket?• Shooting the ball at a large trash can, willmake basket?• Shooting the ball at a carnival, will makebasket?
3. 3. What happens to yourconfidence as the intervalgets smaller?The smaller the interval, thelower your confidence.%%%%%%%%
4. 4. Point Estimate• Use a singlesingle statistic based onsample data to estimate apopulation parameter• Simplest approach• But not always very precise due tovariationvariation in the samplingdistribution
5. 5. Confidence intervalsConfidence intervals• Are used to estimate theunknown population mean• Formula:estimate + margin of error
6. 6. Margin of errorMargin of error• Shows how accurate we believe ourestimate is• The smaller the margin of error, themore precisemore precise our estimate of the trueparameter• Formula:⋅=statistictheofdeviationstandardvaluecriticalm
7. 7. Confidence levelConfidence level• Is the success rate of the methodused to construct the interval• Using this method, ____% of thetime the intervals constructed willcontain the true populationparameter
8. 8. • Found from the confidence level• The upper z-score with probability p lying toits right under the standard normal curveConfidence level tail area z*.05 1.645.025 1.96.005 2.576Critical value (z*)Critical value (z*).05z*=1.645.025z*=1.96.005z*=2.57690%95%99%
9. 9. Confidence interval for aConfidence interval for apopulation mean:population mean:±nzxσ*estimateCriticalvalueStandarddeviation of thestatisticMargin of error
10. 10. What does it mean to be 95%What does it mean to be 95%confident?confident?• 95% chance that µ is contained inthe confidence interval• The probability that the intervalcontains µ is 95%• The method used to construct theinterval will produce intervals thatcontain µ 95% of the time.
11. 11. Steps for doing a confidenceSteps for doing a confidenceinterval:interval:1) Assumptions –• SRS from population (or randomly assignedtreatments)• Sampling distribution is normal (or approximatelynormal)• Given (normal)• Large sample size (approximately normal)• Graph data (approximately normal)• σ is known1) Calculate the interval2) Write a statement about the interval in thecontext of the problem.
12. 12. Statement:Statement: (memorize!!)(memorize!!)We are ________% confidentthat the true mean context lieswithin the interval ______ and______.
13. 13. Assumptions:Have an SRS of blood measurementsPotassium level is normally distributed (given)σ knownWe are 90% confident that the true meanpotassium level is between 3.01 and 3.39.A test for the level of potassium in the bloodis not perfectly precise. Suppose thatrepeated measurements for the sameperson on different days vary normally withσ = 0.2. A random sample of three has amean of 3.2. What is a 90% confidenceinterval for the mean potassium level?( )3899.3,0101.332.645.12.3 =±
14. 14. Assumptions:Have an SRS of blood measurementsPotassium level is normally distributed(given)σ knownWe are 95% confident that the true meanpotassium level is between 2.97 and3.43.95% confidence interval?( )4263.3,9737.232.96.12.3 =±
15. 15. 99% confidence interval?Assumptions:Have an SRS of blood measurementsPotassium level is normally distributed(given)σ knownWe are 99% confident that the true meanpotassium level is between 2.90 and 3.50.( )4974.3,9026.232.576.22.3 =±
16. 16. What happens to the interval as theWhat happens to the interval as theconfidence level increases?confidence level increases?the interval gets wider as theconfidence level increases
17. 17. How can you make the margin ofHow can you make the margin oferror smaller?error smaller?• z* smaller(lower confidence level)• σ smaller(less variation in the population)• n larger(to cut the margin of error in half, n mustbe 4 times as big)Really cannotchange!
18. 18. A random sample of 50 PHS students wastaken and their mean SAT score was 1250.(Assume σ = 105) What is a 95% confidenceinterval for the mean SAT scores of PHSstudents?Assume: Given SRS of students;distribution is approximately normal dueto large sample size; σ knownWe are 95% confident that the true meanSAT score for PHS students is between1220.9 and 1279.1
19. 19. Suppose that we have this random sampleof SAT scores:950 1130 1260 1090 1310 1420 1190What is a 95% confidence interval for thetrue mean SAT score? (Assume σ = 105)Assume: Given SRS of students; distribution isapproximately normal because the boxplot isapproximately symmetrical; σ knownWe are 95% confident that the true mean SATscore for PHS students is between 1115.1 and1270.6.
20. 20. Find a sample size:Find a sample size:=nzmσ*• If a certain margin of error is wanted,then to find the sample size necessaryfor that margin of error use:Always round up to the nearest person!
21. 21. The heights of BCP male students isnormally distributed with σ = 2.5inches. How large a sample isnecessary to be accurate within + .75inches with a 95% confidenceinterval?n = 43
22. 22. In a randomized comparative experimenton the effects of calcium on bloodpressure, researchers divided 54 healthy,white males at random into two groups,takes calcium or placebo. The paperreports a mean seated systolic bloodpressure of 114.9 with standard deviationof 9.3 for the placebo group. Assumesystolic blood pressure is normallydistributed.Can you find a z-interval for thisCan you find a z-interval for thisproblem? Why or why not?problem? Why or why not?
23. 23. Student’s t- distributionStudent’s t- distribution• Developed by William Gosset• Continuous distribution• Unimodal, symmetrical, bell-shapeddensity curve• Above the horizontal axis• Area under the curve equals 1• Based on degrees of freedom
24. 24. Graph examples of t- curves vs normalcurve
25. 25. How doesHow does tt compare tocompare tonormal?normal?• Shorter & more spread out• More area under the tails• As n increases, t-distributionsbecome more like a standardnormal distribution
26. 26. How to findHow to find tt**• Use Table B for t distributions• Look up confidence level at bottom &df on the sides• df = n – 1Find these t*90% confidence when n = 595% confidence when n = 15t* =2.132t* =2.145
27. 27. Formula:Formula:±nstx *:IntervalConfidenceestimateCritical valueStandarddeviation ofstatisticMargin of errorMargin of error
28. 28. Assumptions forAssumptions for tt-inference-inference• Have an SRS from population (orrandomly assigned treatments)• σ unknown• Normal (or approx. normal) distribution– Given– Large sample size– Check graph of data
29. 29. For the Ex. 4: Find a 95% confidenceinterval for the true mean systolicblood pressure of the placebo group.Assumptions:• Have randomly assigned males to treatment• Systolic blood pressure is normally distributed(given).• σ is unknownWe are 95% confident that the true mean systolicblood pressure is between 111.22 and 118.58.)58.118,22.111(273.9056.29.114 =±
30. 30. RobustRobust• An inference procedure is ROBUST ifthe confidence level or p-value doesn’tchange much if the assumptions areviolated.• t-procedures can be used with someskewness, as long as there are nooutliers.• Larger n can have more skewness.Since there is more area in the tails in t-distributions, then, if a distribution hassome skewness, the tail area is notgreatly affected.CI & p-values deal with area in thetails – is the area changed greatlywhen there is skewness
31. 31. Ex. 5 – A medical researcher measuredthe pulse rate of a random sample of 20adults and found a mean pulse rate of72.69 beats per minute with a standarddeviation of 3.86 beats per minute.Assume pulse rate is normallydistributed. Compute a 95% confidenceinterval for the true mean pulse rates ofadults.We are 95% confident that the true meanpulse rate of adults is between 70.883 &74.497.
32. 32. Another medical researcher claims thatthe true mean pulse rate for adults is 72beats per minute. Does the evidencesupport or refute this? Explain.The 95% confidence interval containsthe claim of 72 beats per minute.Therefore, there is no evidence to doubtthe claim.
33. 33. Ex. 6 – Consumer Reports tested 14randomly selected brands of vanillayogurt and found the followingnumbers of calories per serving:160 200 220 230 120 180 140130 170 190 80 120 100 170Compute a 98% confidence interval forthe average calorie content per servingof vanilla yogurt.We are 98% confident that the true mean caloriecontent per serving of vanilla yogurt is between126.16 calories & 189.56 calories.
34. 34. A diet guide claims that you will get 120calories from a serving of vanillayogurt. What does this evidenceindicate?Since 120 calories is not containedwithin the 98% confidence interval, theevidence suggest that the averagecalories per serving does not equal 120calories.Note: confidence intervals tellus if something is NOT EQUALNOT EQUAL– never less or greater than!
35. 35. Some Cautions:Some Cautions:• The data MUST be a SRS from thepopulation (or randomly assignedtreatment)• The formula is not correct for morecomplex sampling designs, i.e.,stratified, etc.• No way to correct for bias in data
36. 36. Cautions continued:Cautions continued:• Outliers can have a large effect onconfidence interval• Must know σ to do a z-interval –which is unrealistic in practice