Call Girl Hyderabad Madhuri 9907093804 Independent Escort Service Hyderabad
L10 confidence intervals
1. CONFIDENCE INTERVALS
STAT 118 BIOSTATISTICS
Lecture 10
Dept. of Medical Laboratories
College of Applied Medical Sciences
Qassim University
March 2016
3. 3
1. Confidence Intervals for the Mean of
Large Samples
• Objectives:
Find a point estimate and a margin of error
Construct and interpret confidence intervals for the
population mean
Determine the minimum sample size required
when estimating μ (Sample Size Calculation)
4. Point Estimate for Population μ
Point Estimate
• A single value estimate for a population parameter
• Most unbiased point estimate of the population mean
μ is the sample mean x
Estimate Population
Parameter…
with Sample
Statistic
Mean: μ x
4
5. Example: Point Estimate for Population μ
A social networking website allows its users to add
friends, send messages, and update their personal
profiles. The following represents a random sample of
the number of friends for 40 users of the website. Find a
point estimate of the population mean, µ. (Source:
Facebook)
140 105 130 97 80 165 232 110 214 201 122
98 65 88 154 133 121 82 130 211 153 114
58 77 51 247 236 109 126 132 125 149 122
74 59 218 192 90 117 105
5
6. Solution: Point Estimate for Population μ
The sample mean of the data is
x
x
5232
130.8
n 40
Your point estimate for the mean number of friends for
all users of the website is 130.8 friends.
6
7. How confident do we want to be that the interval estimate
contains the population mean μ?
Interval Estimate
Interval estimate
• An interval, or range of values, used to estimate a
population parameter.
Point estimate
x 130.8
125 130 135 140
Interval estimate
Right endpoint
146.5
)
145 150
Left endpoint
115.1
(
115 120
7
8. Level of Confidence
Level of confidence c
• The probability that the interval estimate contains the
population parameter.
z
z = 0–zc zc
Critical values
½(1 – c)
c is the area under the
standard normal curve
between the critical values.
½(1 – c)
The remaining area in the tails is 1 – c .
c
Use the Standard
Normal Table to find the
corresponding z-scores.
8
9. zc
Level of Confidence
z
zc
The corresponding z-scores are ±1.645.
• If the level of confidence is 90%, this means that we
are 90% confident that the interval contains the
population mean μ.
c = 0.90
½(1 – c) = 0.05½(1 – c) = 0.05
–zc = –1.645 z = 0 zc = 1.645
9
10. Sampling Error
Sampling error
• The difference between the point estimate and the
actual population parameter value.
• For μ:
the sampling error is the difference x – μ
μ is generally unknown
x varies from sample to sample
10
11. Margin of Error
Margin of error
• The greatest possible distance between the point
estimate and the value of the parameter it is
estimating for a given level of confidence, c.
• Denoted by E.
• Sometimes called the maximum error of estimate or
error tolerance.
n
σE zcσ x zc
When n ≥ 30, the sample
standard deviation, s, can
be used for σ.
11
12. 12
Example: Finding the Margin of Error
Use the social networking website data and a
95% confidence level to find the margin of
error for the mean number of friends for all
users of the website. Assume the sample
standard deviation is about 53.0.
13. zc
Solution: Finding the Margin of Error
z
zcz = 0
• First find the critical values
0.95
0.0250.025
–zc = –1.96
95% of the area under the standard normal curve falls
within 1.96 standard deviations of the mean. (You
can approximate the distribution of the sample means
with a normal curve by the Central Limit Theorem,
because n = 40 ≥ 30.)
zc = 1.96
13
14. Solution: Finding the Margin of Error
40
14
c c
s
n n
E z z
1.96
53.0
You don’t know σ, but
since n ≥ 30, you can
use s in place of σ.
16.4
You are 95% confident that the margin of error for the
population mean is about 16.4 friends.
15. Confidence Intervals for the Population
Mean
A c-confidence interval for the population mean μ
•
• The probability that the confidence interval contains μ
is c.
n
15
x E x E where E zc
16. Constructing Confidence Intervals for μ
Finding a Confidence Interval for a Population Mean
(n ≥ 30 or σ known with a normally distributed population)
In Words In Symbols
n
x x
s (x x)2
n1
1. Find the sample statistics n and
x.
2. Specify σ, if known.
Otherwise, if n ≥ 30, find the
sample standard deviation s and
use it as an estimate for σ.
16
17. Constructing Confidence Intervals for μ
3. Find the critical value zc that
corresponds to the given
level of confidence.
4. Find the margin of error E.
5. Find the left and right
endpoints and form the
confidence interval.
Use the Standard
Normal Table or
technology.
n
E zc
Left endpoint: x E
Right endpoint: x E
Interval:
x E x E
17
In Words In Symbols
18. Example: Constructing a Confidence
Interval
Construct a 95% confidence interval for the mean
number of friends for all users of the website.
Solution: Recall x 130.8 and E ≈ 16.4
114.4 < μ < 147.2
Left Endpoint:
x E
130.816.4
114.4
18
Right Endpoint:
x E
130.816.4
147.2
19. Solution: Constructing a Confidence
Interval
114.4 < μ < 147.2
•
With 95% confidence, you can say that the population
mean number of friends is between 114.4 and 147.2.
19
20. Example: Constructing a Confidence
Interval σ Known
A college admissions director wishes to estimate the
mean age of all students currently enrolled. In a random
sample of 20 students, the mean age is found to be 22.9
years. From past studies, the standard deviation is
known to be 1.5 years, and the population is normally
distributed. Construct a 90% confidence interval of the
population mean age.
20
21. zc
Solution: Constructing a Confidence
Interval σ Known
• First find the critical values
z
zc
c = 0.90
½(1 – c) = 0.05½(1 – c) = 0.05
–zc = –1.645 z = 0 zc = 1.645
21
zc = 1.645
22. • Margin of error:
Solution: Constructing a Confidence
Interval σ Known
20
c
n
E z 1.645
1.5
0.6
• Confidence
interval: Left
Endpoint:
x E
22.9 0.6
22.3
Right Endpoint:
x E
22.9 0.6
23.5
22.3 < μ < 23.5
22
23. Solution: Constructing a Confidence
Interval σ Known
22.3 < μ < 23.5
•
23
22.9
)
22.3
(
23.5
With 90% confidence, you can say that the mean age
of all the students is between 22.3 and 23.5 years.
Point estimate
xx E x E
24. 24
Interpreting the Results
• μ is a fixed number. It is either in the confidence
interval or not.
• Incorrect: “There is a 90% probability that the actual
mean is in the interval (22.3, 23.5).”
• Correct: “If a large number of samples is collected
and a confidence interval is created for each sample,
approximately 90% of these intervals will contain μ.
25. Interpreting the Results
The horizontal segments
represent 90% confidence
intervals for different
samples of the same size.
In the long run, 9 of every
10 such intervals will
contain μ. μ
25
26. 2. Sample Size
• If σ is unknown, you can estimate it using s, provided
you have a preliminary sample with at least 30
members.
• Given a c-confidence level and a margin of error E,
the minimum sample size n needed to estimate the
population mean µ is
2
26
E
n
zc
27. 27
Example: Sample Size
You want to estimate the mean number of friends for all
users of the website. How many users must be included
in the sample if you want to be 95% confident that the
sample mean is within seven friends of the population
mean?
Assume the sample standard deviation is about 53.0.
28. zc
Solution: Sample Size
• First find the critical values
zc = 1.96
z
zc
0.95
0.0250.025
–zc = –1.96 z = 0 zc = 1.96
28
29. Solution: Sample Size
zc = 1.96 σ ≈ s ≈ 53.0 E = 7
2
29
2
E 7
220.23n zc 1.9653.0
When necessary, round up to obtain a whole number.
You should include at least 221 users in your sample.
30. 30
3. Confidence Intervals for the Mean
(Small Samples)
• Objectives:
Interpret the t-distribution and use a t-distribution
table
Construct confidence intervals when n < 30, the
population is normally distributed, and σ is
unknown
31. The t-Distribution
• When the population standard deviation is unknown,
the sample size is less than 30, and the random
variable x is approximately normally distributed, it
follows a t-distribution.
t x
s
n
• Critical values of t are denoted by tc.
31
32. Properties of the t-Distribution
1. The t-distribution is bell shaped and symmetric
about the mean.
2. The t-distribution is a family of curves, each
determined by a parameter called the degrees of
freedom. The degrees of freedom are the number
of free choices left after a sample statistic such as x
is calculated. When you use a t-distribution to
estimate a population mean, the degrees of freedom
are equal to one less than the sample size.
d.f. = n – 1 Degrees of freedom
32
33. Properties of the t-Distribution
3. The total area under a t-curve is 1 or 100%.
4. The mean, median, and mode of the t-distribution are
equal to zero.
5. As the degrees of freedom increase, the t-distribution
approaches the normal distribution. After 30 d.f., the t-
distribution is very close to the standard normal z-
distribution.
t
0
Standard normal curve
The tails in the t-
distribution are “thicker”
than those in the standard
normal distribution.
d.f. = 2
d.f. = 5
33
34. Example: Critical Values of t
tc = 2.145
Find the critical value tc for a 95% confidence level
when the sample size is 15.
Solution: d.f. = n – 1 = 15 – 1 = 14
Table 5: t-Distribution
34
35. Solution: Critical Values of t
t
–tc = –2.145 tc = 2.145
95% of the area under the t-distribution curve with 14
degrees of freedom lies between t = ±2.145.
c = 0.95
35
36. Confidence Intervals for the Population
Mean
A c-confidence interval for the population mean μ
•
• The probability that the confidence interval contains μ
is c.
s
36
n
x E x E where E tc
37. Confidence Intervals and t-Distributions
2. Identify the degrees of
freedom, the level of
confidence c, and the
critical value tc.
3. Find the margin of error E.
n
x x
s (x x)2
n1
n
E tc
s
d.f. = n – 1
1. Identify the sample
statistics n, x , ands.
37
In Words In Symbols
38. Confidence Intervals and t-Distributions
4. Find the left and right
endpoints and form the
confidence interval.
Left endpoint: x E
Right endpoint: x E
Interval:
x E x E
38
In Words In Symbols
39. Example: Constructing a Confidence
Interval
You randomly select 16 coffee shops and measure the
temperature of the coffee sold at each. The sample mean
temperature is 162.0ºF with a sample standard deviation
of 10.0ºF. Find the 95% confidence interval for the
population mean temperature. Assume the temperatures
are approximately normally distributed.
Solution:
Use the t-distribution (n < 30, σ is unknown,
temperatures are approximately normally distributed).
39
40. Solution: Constructing a Confidence
Interval
• n =16, x = 162.0 s = 10.0 c = 0.95
• df = n – 1 = 16 – 1 = 15
• Critical Value Table 5: t-Distribution
40
tc = 2.131
41. Solution: Constructing a Confidence
Interval
• Margin of error:
16
c
n
E t 2.131 10 5.3s
• Confidence
interval: Left
Endpoint:
x E
1625.3
156.7
Right Endpoint:
x E
1625.3
167.3
156.7 < μ < 167.3
41
42. Solution: Constructing a Confidence
Interval
• 156.7 < μ < 167.3
•
42
162.0
)
156.7
(
167.3
With 95% confidence, you can say that the population
mean temperature of coffee sold is between 156.7ºF
and 167.3ºF.
Point estimate
xx E x E
43. No
Normal or t-Distribution?
Is n ≥ 30?
Is the population normally,
or approximately normally,
distributed? Cannot use the normal
distribution or the t-distribution.
Yes
Is σ known?
No
If σ is unknown, use s instead.
c
n
Use the normal distribution with
E z σ
Yes
No
c
n
E z .
Use the normal distribution with
σ
Yes
and n – 1 degrees of freedom.
c
43
Use the t-distribution with
E t
s
n
44. Example: Normal or t-Distribution?
You randomly select 25 newly constructed houses. The
sample mean construction cost is $181,000 and the
population standard deviation is $28,000. Assuming
construction costs are normally distributed, should you
use the normal distribution, the t-distribution, or neither
to construct a 95% confidence interval for the
population mean construction cost?
Solution:
Use the normal distribution (the population is
normally distributed and the population standard
deviation is known)
44