Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 8: Confidence Intervals

Similar presentations


Presentation on theme: "Chapter 8: Confidence Intervals"— Presentation transcript:

1 Chapter 8: Confidence Intervals
Confidence Interval: Mean A confidence interval is a range of numbers that is likely contains the true mean. 95% confidence interval for the mean: Lower limit = sample mean – margin of error ( ) Upper limit = sample mean + margin of error Remember that the sample mean is normally distributed, if the sample size n is large (central limit theorem).

2 A confidence interval for the mean is the sample mean
plus and minus the margin of error (誤差範圍,誤差幅度 ). -margin of error margin of error Upper limit Lower limit Sample mean Since the sample mean changes every time you redo the sampling. The confidence interval also changes. A 95% confidence interval is an interval around the sample mean and there is a 95% chance that the population mean is contains in the interval.

3 95 out of 100 intervals contain the population mean 
95 out of 100 intervals contain the population mean 

4 A general expression for the confidence interval for a mean:
In Eq. [8.5] we assume we know the population standard deviation . When we do not have , we use the sample standard deviation, s. That is the confidence interval becomes Eq. [8.7] works when the sample size is large, n = 30 or larger, or when the population distribution is normal.

5 Learning activity 8.1-1 Confidence interval for a mean
 Open kbs.xls!Data.  Calculate the mean and standard deviation of the Kbs variable by using AVERAGE() AND STDEV().  Use Excel to calculate the 95% confidence interval for the mean.  Use MegaStat | Descriptive Statistics to calculate the confidence interval  See kbs.xls!Solution1 for the solution.  Calculate 99% confidence interval by using Excel and with MegaStat  compare the 95% and 99% confidence intervals (kbs.xls!Solution1a).

6 Confidence Interval: Proportion
Calculate the confidence interval for a proportion by where p is the sample proportion. We do not know  in [7.5]. Learning Activity Confidence Interval for a Proportion  Open kbs.xls!p.  Use Excel to calculate the 95% confidence interval for the mean.  Use MegaStat | Descriptive Statistics to calculate the confidence interval  See kbs.xls!Solution2 for the solution.

7 Note: 95% margin of error is approximately SQRT(1/n)
Since sqrt(p(1-p)) is largest when p = 0.5 and Sqrt(0.5*0.5) = 0.5, 1.96*05 approximately equal to 1.

8 Sample Size Estimation
Sample Size: Mean We specify the margin of error E (from [8.5]) z/2 = 1.96 for 95% and 2.58 for 99%.  = population standard deviation. E = Error tolerance. We have to estimate .

9 A company wants to estimate the mean amount each
customer purchases within $2 with 95% confidence. A small sample indicates that the standard deviation is about $5.5. Learning Activity Sample size for a mean  Open SampleSize.xls!Start.  Calculate the sample size by using the Eq. [8.9]  MegaStat | confidence Intervals | Sample Size – Mean  See SampleSize.xls!solution1.

10 Sample Size : Proportion
where  is the population proportion. Since you do no know the true proportion , you can estimate  by taking samples. Or use  = 0.5, since (1 - ) is largest when  = 0.5. This will give you a conservative n value.

11 A company wants to estimate with a margin of error of 4%
the proportion of people who will vote for a candidate, using a 95% confidence level. Since the company does not know the true proportion, it uses  = 0.5. Learning Activity Sample size for a proportion  Open SampleSize.xls!Start.  Calculate the sample size by using the Eq. [8.10]  MegaStat | confidence Intervals | Sample Size – p  See sampleSize.xls!Solution2.  See sampleSize.xls!Why p of .5.

12 Learning Activity 8.B-1 Confidence Interval Simulation
 Open CLT-CI.xls. You can see that sample means derived from uniform random number have a near normal distribution. We calculate the confidence intervals for the mean of 30 uniform distributed random numbers (between 0 and 100). We repeat such calculation 600 times and get 600 intervals. We can see that about 95% of 600 intervals contains the true mean of 50. Note that the variance for uniform random variable is  = SQRT((ymax-ymin)2/12) =SQRT((100)^2)/12) = Margin of error = 1.96*28.87/sqrt(30) = 10.33


Download ppt "Chapter 8: Confidence Intervals"

Similar presentations


Ads by Google