1
INTRODUCTION TO
STATISTICS & PROBABILITY
Chapter 7: Inference for Distributions
Dr. Nahid Sultana
Chapter 7
2
Inference for Distributions
7.1 Inference for the Mean of a Population
7.1 Inference for the Mean of a
Population
Ø The t Distributions
Ø One-Sample t Confidence Interval
Ø One-Sample t Test
Ø Matched Pairs t Procedures
3
Example – Sweetening colas
4
Cola manufacturers want to test how much the sweetness of a new cola
drink is affected by storage. The sweetness difference due to storage was
evaluated by 10 professional tasters (by comparing the sweetness before
and after storage):
Taster Sweetness difference (D = Before – After)
1 2.0
2 0.4 We want to test if storage results in a loss of
3 0.7 sweetness:
4 2.0 H 0 : µ diff 0 ; H a : µ diff 0
5 −0.4
This looks familiar. However, here we do not
6 2.2
know the population parameter σ.
7 −1.3
8 1.2
9 1.1
This situation is very common with real data.
10 2.3
When σ is unknown
The sample s.d. s provides an estimate of the population s.d. σ.
5
When the sample size is large, But when the sample size is small,
then s is a good estimate of σ. then s is a poor estimate of σ.
The sample is likely to contain The sample contains only a few
elements representative of the individuals.
whole population.
The t Distributions
6
When the sampling distribution of x is close to Normal, we can find probabilities
involving x by standardizing: x −µ
z=
σ n
When we don’t know σ, we can estimate it using the sample standard
deviation sx. What happens when we standardize?
x −µ
?? =
sx n This new statistic does not have a Normal distribution!
Standard deviation s – standard error s/√n
7
Ø When σ is unknown, we estimate it with the sample standard deviation s.
Ø Then we estimate the standard deviation of by .
Ø This quantity is called the standard error of the sample mean and we
denote it by SEM or .
Example: A simple random sample of five female basketball players is
selected. Their heights (in cm) are 170, 175, 169, 183, and 177.
What is the standard error of the mean of these height
measurements?
Solution: Sample mean = 174.8
Sample s.d, s= √32.2
SEM = = √(32.2/5) = 2.538.
The t Distributions
8
Suppose that an SRS of size n is drawn from an N(µ,σ) population.
Ø When σ is known, the sampling distribution is N(μ, σ/√n).
Ø When σ is estimated from the sample standard deviation s, the
sampling distribution follows a t-distribution t(μ, s/√n) with degrees of
freedom n − 1.
The t Distributions
When comparing the density curves of the standard Normal distribution
and t distributions, several facts are apparent:
9
üThe density curves of the t distributions are
similar in shape to the standard Normal
curve.
üThe spread of the t distributions is a bit
greater than that of the standard Normal
distribution.
üThe t distributions have more probability in
the tails and less in the center than does
the standard Normal.
üAs the degrees of freedom increase, the t-
density curve approaches the standard
Normal curve even more closely.
We can use Table D to determine critical values t* for t distributions with
different degrees of freedom.
Standardizing the data before using
Table D
10
As with the normal distribution,
• the first step is to standardize the data.
• Then we can use Table D to obtain the area under the curve.
Here, μ is the mean (center) of the sampling distribution,
and the standard error of the mean s/√n is its standard deviation (width).
Using Table D
11
Suppose you want to construct a 95% confidence interval for the mean
µ of a Normal population based on an SRS of size n = 12.
What critical t* should you use?
Upper-tail probability p In Table D, we consult the row
corresponding to df = n – 1 = 11.
df .05 .025 .02 .01
10 1.812 2.228 2.359 2.764
11 1.796 2.201 2.328 2.718
12 1.782 2.179 2.303 2.681
z* 1.645 1.960 2.054 2.326 We move across that row to the
90% 95% 96% 98% entry that is directly above 95%
confidence level.
Confidence level C
One-Sample t Confidence
Interval
12
Ø level C confidence interval
Ø C is the area between −t* and t*.
Ø We find t* from Table D for df = n−1 and confidence
level C.
The One-Sample t Interval for a Population Mean
Choose an SRS of size n from a population having unknown mean µ.
sx
A level C confidence interval for µ is: x t*
n
where t* is the critical value for the t(n – 1) distribution.
sx
The margin of error is t*
n
This interval is exact when the population distribution is Normal and
12
approximately correct for large n in other cases.
Example: Listening to music on cell phones.
On average, U.K. subscribers with 3G phones spent an average of 8.3 hours
per month listening to full-track music on their cell phones.
Suppose we want to determine a 95% confidence interval for the U.S.
average and draw the following random sample of size 8 from the U.S.
population of 3G subscribers: 5 6 0 4 11 9 2 3
Here sample mean, x 5 ; s. d. , s 3.63 ; df n-1 7.
The standard error is
t∗ = 2.365
The 95% CI is
13
Example
14
A manufacturer of high-resolution video terminals must control the tension on the mesh
of fine wires that lies behind the surface of the viewing screen. The tension is measured
by an electrical device with output readings in millivolts (mV). A random sample of 20
screens has the following mean and standard deviation:
x = 306.32 mV and sx = 36.21 mV
We want to estimate the true mean tension µ of all the video terminals produced this
day at a 90% confidence level.
Upper-tail probability
Solution: Since n = 20, we use the t distribution p
€ df .10 .05 .025
with df = 19 to find the critical value. 18 1.130 1.734 2.101
From Table D, we find t* = 1.729. 19 1.328 1.729 2.093
20 1.325 1.725 2.086
Therefore, the 90% confidence interval for µ is:
80% 90% 95%
sx 36.21
x ± t* = 306.32 ± 1.729 = 306.32 ± 14 Confidence level C
n 20
= (292.32, 320.32)
We are 90% confident that the interval from 292.32 to 320.32 mV captures the true mean
tension in the entire batch of video terminals produced that day.
Example
15
Assume that you don’t know what the population standard deviation is. You
draw a sample of 30 screws and calculate their mean length. The mean for
your sample is 4.8, and the standard deviation of your sample (s) is 0.4
centimeters.
What is the 98% confidence interval for the population mean? Round
your answer to two decimal places.
x
The One-Sample t Test t
sx
0
n
As in the previous chapter, a test of hypotheses requires a few
steps:
1. Stating the null and alternative hypotheses (H0 versus Ha)
2. Calculating t and its degrees of freedom
3. Finding the area under the curve with Table D
4. Stating the P-value and interpreting the result
16
The One-Sample t Test (Cont…)
The P-value is calculated as the corresponding area under the curve,
one-tailed or two-tailed depending on Ha:
17
Example
18
The level of dissolved oxygen (DO) in a river is an important indicator of
the water’s ability to support aquatic life.
A researcher measures the DO level at 15 randomly chosen locations along
a river. Here are the results in milligrams per liter:
4.53 5.04 3.29 5.23 4.13 5.50 4.83 4.40
5.42 6.38 4.01 4.66 2.87 5.73 5.55
A dissolved oxygen level below 5 mg/l puts aquatic life at risk.
We want to perform a test at the a = 0.05 significance level of:
H0 : µ = 5
Ha : µ < 5
where µ is the actual mean dissolved oxygen level in this river.
Example (Cont…)
The sample mean and standard deviation are: x = 4.771 and sx = 0.9396
H0: µ = 5; Ha: µ < 5
x − µ0 4.771− 5
Test statistic t = = = −0.94
€ sx 0.9396
n 15
P-value: The P-value is the area to the left of
t = –0.94 under the t distribution curve with
€ df = 15 – 1 = 14.
Upper-tail probability p But P(t < –0.94 ) = P(t > 0.94 )
df .25 .20 .15
The P-value is between 0.15 and 0.20, which is
13 .694 .870 1.079
14 .692 .868 1.076
greater than our a = 0.05 significance level,
15 .691 .866 1.074 à We fail to reject H0.
50% 60% 70%
19
Confidence level C àWe don’t have enough evidence to conclude
that the mean DO level in the stream is less than
5 mg/l.
Example – Sweetening colas cont…)
Is there evidence that storage results in
sweetness loss for the new cola
recipe at the α=5% level of significance?
H0: μ = 0 versus Ha: μ > 0 (one-sided test)
There is a significant loss of
sweetness, on average, following
20 storage.
Matched Pairs t Procedures
21
Ø Comparative studies are more convincing than single-sample investigations.
For that reason, the one-sample inference is less common than comparative
inference.
Ø Study designs that involve making two observations on the same individual, or
one observation on each of two similar individuals, result in paired data.
Ø When paired data result from measuring the same quantitative variable
twice, as in the Sweetening colas study, we can make comparisons by
analyzing the differences in each pair.
Example: Pre-test and post-test studies look at data collected on the same
sample elements before and after some experiment is performed.
Matched Pairs t Procedures
To compare the responses to the two treatments in a matched-pairs design,
find the difference between the responses within each pair. Then apply the
one-sample t procedures to these differences.
Matched Pairs t Procedures
Conceptually, this is not different from tests on one population.
22
Example – Sweetening colas (revisited)
The sweetness loss due to storage was evaluated by 10 professional
tasters (comparing the sweetness before and after storage):
Although the text didn’t mention it explicitly, this is a pre-/post-test design
and the variable is the difference in cola sweetness before minus after
storage. A matched pairs test of significance is indeed just like a one-
sample test.
23
Example: Does lack of caffeine increase depression?
Individuals diagnosed as caffeine dependent
are assigned to receive daily pills.
Sometimes, the pills contain caffeine and
other times they contain a placebo.
Depression was assessed.
For each individual in the sample, we
have calculated a difference in
depression score (placebo minus
caffeine).
24 Caffeine deprivation causes a significant increase in depression.
Matched Pairs t Procedures Example
25
The MeasureMind 3D MultiSensor metrology software is used by various companies
to measure complex machine parts. GE Healthcare discovered that unchecking one
software option reduced measurement time by 10%. To further investigate this, the
researchers measured 51 parts using the software both with and without the option
checked. (Order of checking the option or not was randomized.) The difference in
the measurements with the option checked and unchecked was recorded.
We want to perform a test at the a = 0.05 significance level of
H0 : µ = 0
Ha : µ ≠ 0
where µ is the actual mean difference for the entire population of
parts.
24
Matched Pairs t Procedures Example
The sample mean and standard deviation are x = 0.0504 and sx = 0.6943
26
x −µ 0 0.0504 − 0
Test statistic t = = = 0.52
sx 0.6943
n 51
P-value: The P-value is the twice the area to the left of t =
0.52 under the t distribution curve with df = 51 – 1 = 50.
The P-value is greater than 2 x 0.25 = 0.50.
Because this is greater than our a = 0.05
Upper-tail probability p significance level, we fail to reject H0. We do not
df .25 .20 .15 have enough evidence to conclude that unchecking
40 0.681 0.851 1.050 the option has an impact on the measurement times.
50 0.679 0.849 1.047
60 0.679 0.848 1.045
However, a lack of statistical significance does not
50% 60% 70%
prove the null hypothesis is true. The company may
Confidence level C
want to consider a larger study to improve precision.