MATH 10: Elementary Statistics and Probability Chapter 8: Confidence Intervals

MATH 10: Elementary Statistics and Probability Chapter 8: Confidence Intervals Tony Pourmohamad Department of Mathematics De Anza College Spring 2015...
Author: Ethelbert Ray
2 downloads 1 Views 424KB Size
MATH 10: Elementary Statistics and Probability Chapter 8: Confidence Intervals Tony Pourmohamad Department of Mathematics De Anza College

Spring 2015

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Objectives By the end of this set of slides, you should be able to: 1

Calculate and interpret intervals for estimating a population mean and a population proportion

2

Understand what the Student t distribution is, and how to use it

3

Discriminate between problems applying the normal and the Student’s t distribution

4

Calculate the sample size required to estimate a population mean and a population proportion given a desired confidence level and margin of error

2 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Inferential Statistics • Inferential Statistics: Using sample data to make generalizations about an unknown population • The sample data helps us to make an estimate of a population parameter • We can think of a sample statistic as a "point estimate" of the population parameter • Example: Imagine you want to figure out what the population mean µ of heights of students at De Anza is . How can we construct a point estimate of the population mean? . We can collect a random sample of students and use the sample mean ¯ x to estimate the population mean µ . Question: If somebody else collected a random sample of students and calculated the sample average ¯ x , would you expect them to get exactly the same estimate as you did? 3 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Inferential Statistics • We can estimate a population parameter using a sample statistic • We can estimate the population mean µ using the sample mean ¯ x • But every time we collect a different sample we will get a different sample statistic, so how do we deal with this? • We need some way to calculate the amount of error we believe our estimate has • We can quantify the amount of error in our estimate by calculating the margin of error • Once we calculate the margin of error, we can think of estimating the population parameter with an interval

(point estimate − margin or error, point estimate + margin or error) • This interval is what we shall call a Confidence Interval 4 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Confidence Intervals • A confidence interval (CI) is going to look something like CI = (point estimate − margin or error, point estimate + margin or error)

• A confidence interval states the range within which a population parameter "probably" lies • The interval within which a population parameter is expected to occur is called a confidence interval • The confidence interval for a mean has a very specific form CI = (¯ x − margin or error, ¯ x + margin or error)

• Question: How do we calculate the margin of error (ME)?

5 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

The Distribution of the Sample Mean • Recall: The CLT told us that the distribution of the sample mean was  

σ µ, √

¯∼N X

n

Plot of the Distribution of the Sample Mean

µ − 3σ

n

µ − 2σ

n

µ−σ

n

µ

µ+σ

n

µ + 2σ

n

µ + 3σ

n

6 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

The Distribution of the Sample Mean • The empirical rule tells that we should expect to see roughly all of our data between 3 standard deviations above and below the the population mean, i.e.,

σ µ ± 3√

n

• Or rather,

  σ σ µ − 3√ , µ + 3√ n

n

• This looks like a confidence interval! • So, the margin of error depends upon the standard deviation of the distribution of the sample mean and the z score

7 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Margin of Error for the Mean • If we know the population standard deviation σ then the margin of error is the following:

σ

ME = zα/2 √

n

• So to calculate the margin of error all we need is . The population standard deviation σ . The sample size n . The α level . The z score corresponding to zα/2 • zα/2 is called the critical value • Let’s look at the following picture to understand what zα/2 is

8 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Margin of Error for the Mean • The α level is a number between 0 and 1 • The α level tells us the percentage of area around the mean, which is (1 − α) • So α/2 is the percentage of area in the two tails

• Every α/2 will correspond to a certain z score we call zα/2 9 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Margin of Error for the Mean • Example: Let α = 0.05, then α/2 is

α 2

=

0.05 2

= 0.025

and 1 − α = 1 − 0.05 = 0.95 zα/2 = 1.96

95% 2.5% −1.96

2.5% 0

1.96

10 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Examples • Look at Worksheet #6 • Use can use your calculator to do this to • If you want to calculate the value of zα/2 that corresponds to a certain confidence level, then follow these steps: Push 2nd, then DISTR Select invNorm() and then push ENTER 3 Then enter the following: invNorm(1 − α/2, 0, 1) 1 2

• Question: What is the critical value zα/2 when α = 0.05? • Solution: invNorm(0.975, 0, 1) = 1.95996

11 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Confidence Intervals for the Mean • A confidence interval, in general, looks like Point Estimate ± Margin of Error

• A confidence interval for the mean µ (when the population standard deviation is known) is

σ ¯x ± zα/2 √

n

• So we calculate ¯ x , σ, and n from the sample data • How do we specify the α level? • α will be determined by the confidence level (CL)

12 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Confidence Level • The confidence level (CL) is a number between 0 and 1 • The confidence level will always be CL = 1 − α • The confidence level tell us if we were to take repeated samples and calculate many confidence interval based on those samples, then we would expect that CL% of the confidence intervals would be "good estimates" that would contain the true value of the population parameter we are trying to estimate • Example: If our CL = 90%, that means that if we took 10 random samples, calculated 10 averages, and then constructed 10 confidence intervals, then we would expect 9 out of the 10 confidence intervals to contain the true population mean • If our CL = 90% then α = 1 − CL = 0.10 or 10%

13 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Confidence Interval for the Mean • When the population standard deviation is known, the CL% confidence interval is σ ¯x ± zα/2 √ n • The three confidence intervals that are used often used the most are the 90%, 95% and 99% confidence intervals • The 90% confidence interval is

σ √



σ √



σ √



 ¯x ± 1.645

n

• The 95% confidence interval is

 ¯x ± 1.96

n

• The 99% confidence interval is

 ¯x ± 2.58

n

14 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Examples • Look at Worksheet #6

15 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Confidence Intervals in General • The more confident we are (so the larger the confidence level) the wider the confidence interval will be • The less confident we are (so the smaller the confidence level) the tighter the confidence interval will be • Why is that? Think about the formula and a mathematical reason

σ ¯x ± zα/2 √

n

• What is the more intuitive reason?

16 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

The Student t Distribution • The Student t distribution is a continuous distribution • The graph of the Student t distribution is bell shaped (so unimodal and symmetric) Plot of the Student t Distribution

17 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

The Student t Distribution • The mean, median, and mode of the Student t distribution are all equal to 0 and located at the peak • The Student t distribution is symmetrical about its mean. Half the area under the curve is above the peak, and the other half is below it Plot of the Student t Distribution

50%

50%

0 18 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

The Student t Distribution • The Student t distribution is very similar to the standard normal distribution • The Student t distribution has mean equal to 0, and depends upon the degrees of freedom df • X ∼ tdf • The df = n − 1 • We will often just call it a t distribution • Just like the in the case of the normal distribution, we will have to use a t table to calculate probabilities • The t table can be found on the course webpage under handouts

19 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Connection to the Standard Normal Distribution • The Student t distribution is very similar to the standard normal distribution • The standard normal distribution is a t distribution when the df = ∞

X~N(0,1) X~t1 X~t2 X~t5

−4

−2

0

2

4

20 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Confidence Interval for the Mean • When the population standard deviation is unknown, the CL% confidence interval is s ¯x ± tα/2 √ n • So when the population standard deviation is unknown, s ME = tα/2 √

n

• Important: α/2 is NOT the degrees of freedom • tα /2 is called the critical value • s is the sample standard deviation which we use since the population standard deviation is unknown • In most practical applications, we usually do not know the population standard deviation and have to use the sample standard deviation 21 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Examples • Look at Worksheet #6

22 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Proportions • A proportion p is the number of successes in a population of size N, i.e., X p= N where X = the number of successes in the population and N is the population size • An estimate of of the population proportion is called the sample ˆ where proportion p x ˆ= p n and x = the number of successes in the random sample and n is the sample size • In your book, p ˆ is written as p0

23 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Proportions • It turns out that the distribution of p ˆ is

r ˆ∼N p

p,

p(1 − p)

!

n

• p is the true population proportion • n is the sample size • We can use this fact about the distribution to create confidence intervals for proportions!

24 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Confidence Interval for a Proportion • The CL% confidence interval for a population proportion is

r ˆ ± zα/2 p

ˆ (1 − p ˆ) p n

• So margin of error is

r ME = zα/2

ˆ (1 − p ˆ) p n

• Note: When calculating the critical value zα/2 we get to use the z table again just like we did for the case of the mean when the standard deviation was known

25 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Examples • Look at Worksheet #6

26 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Recap of Confidence Intervals • When building a confidence interval for the mean and the standard deviation the formula is known we use

σ ¯x ± zα/2 √

n

• When building a confidence interval for the mean and the standard deviation the formula is unknown we use s

¯x ± tα/2 √

n

• When building a confidence interval for a proportion the formula is

r ˆ ± zα/2 p

ˆ (1 − p ˆ) p n 27 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Using Your Calculator • If you want to calculate the confidence interval for the mean when the standard deviation is known, follow these steps: 1 2 3 4 5 6 7 8 9

Push STAT Arrow over to TESTS Select ZInterval Select Stats Enter the population standard deviation σ Enter the sample mean ¯ x Enter the sample size n Enter the confidence level Hit calculate

28 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Using Your Calculator • If you want to calculate the confidence interval for the mean when the standard deviation is unknown, follow these steps: 1 2 3 4 5 6 7 8 9

Push STAT Arrow over to TESTS Select TInterval Select Stats Enter the sample standard deviation s Enter the sample mean ¯ x Enter the sample size n Enter the confidence level Hit calculate

29 / 30

Confidence Interval for a Mean

Student t Distribution

Confidence Interval for a Proportion

Using Your Calculator • If you want to calculate the confidence interval for a proportion, follow these steps: 1 2 3 4 5 6 7

Push STAT Arrow over to TESTS Select 1-PropZInt Enter the number of successes x Enter the sample size n Enter the confidence level Hit calculate

30 / 30

Suggest Documents