mathematical statisticsvucdinh.github.io/s19/450/lecture28.pdf · 2020. 12. 15. · week 10 chapter...
TRANSCRIPT
![Page 1: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/1.jpg)
Mathematical statistics
May 3rd, 2019
Lecture 28: Inferences based on two samples
Mathematical statistics
![Page 2: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/2.jpg)
Overview
Week 1 · · · · · ·• Probability reviews
Week 2 · · · · · ·• Chapter 6: Statistics and SamplingDistributions
Week 4 · · · · · ·• Chapter 7: Point Estimation
Week 7 · · · · · ·• Chapter 8: Confidence Intervals
Week 10 · · · · · ·• Chapter 9, 10: Test of Hypothesis
Week 14 · · · · · ·• Regression
Mathematical statistics
![Page 3: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/3.jpg)
Inferences based on two samples
10.1 Difference between two population means
z-testconfidence intervals
10.2 The two-sample t test and confidence interval
10.3 Analysis of paired data
Mathematical statistics
![Page 4: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/4.jpg)
Chapter 9: Hypothesis testing (with one sample)
Mathematical statistics
![Page 5: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/5.jpg)
Hypothesis testing for one parameter
1 Identify the parameter of interest
2 Determine the null value and state the null hypothesis
3 State the appropriate alternative hypothesis
4 Give the formula for the test statistic
5 State the rejection region for the selected significance level α
6 Compute statistic value from data
7 Decide whether H0 should be rejected and state thisconclusion in the problem context
Mathematical statistics
![Page 6: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/6.jpg)
Sample solution
Parameter of interest: µ = true average activationtemperature
Hypotheses
H0 : µ = 130
Ha : µ 6= 130
Test statistic:
z =x − 130
1.5/√n
Rejection region: either z ≤ −z0.005 or z ≥ z0.005 = 2.58
Substituting x = 131.08, n = 25 → z = 2.16.
Note that −2.58 < 2.16 < 2.58. We fail to reject H0 atsignificance level 0.01.
The data does not give strong support to the claim that thetrue average differs from the design value.
Mathematical statistics
![Page 7: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/7.jpg)
Test about a population mean
Null hypothesisH0 : µ = µ0
The alternative hypothesis will be either:
Ha : µ > µ0
Ha : µ < µ0
Ha : µ 6= µ0
Three settings
normal population with known σlarge-sample testsa normal population with unknown σ
Mathematical statistics
![Page 8: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/8.jpg)
Normal population with known σ
Null hypothesis: µ = µ0
Test statistic:
Z =X − µ0
σ/√n
Mathematical statistics
![Page 9: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/9.jpg)
Large-sample tests
Null hypothesis: µ = µ0
Test statistic:
Z =X − µ0
S/√n
[Does not need the normal assumption]
Mathematical statistics
![Page 10: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/10.jpg)
t-test
[Require normal assumption]
Mathematical statistics
![Page 11: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/11.jpg)
P-value
Mathematical statistics
![Page 12: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/12.jpg)
Testing by P-value method
Remark: the smaller the P-value, the more evidence there is in thesample data against the null hypothesis and for the alternativehypothesis.
Mathematical statistics
![Page 13: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/13.jpg)
Example
Problem
The target thickness for silicon wafers used in a certain type ofintegrated circuit is 245 µm. A sample of 50 wafers is obtainedand the thickness of each one is determined, resulting in a samplemean thickness of 246.18 µm and a sample standard deviation of3.60 µm.Does this data suggest that true average wafer thickness issomething other than the target value?
Mathematical statistics
![Page 14: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/14.jpg)
P-values for z-tests
Mathematical statistics
![Page 15: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/15.jpg)
P-values for z-tests
Mathematical statistics
![Page 16: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/16.jpg)
P-values for t-tests
Mathematical statistics
![Page 17: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/17.jpg)
Practice problem
Problem
Suppose we want to test
H0 : µ = 25
Ha : µ > 25
from a sample with n = 5 and the calculated value
t =x − 25
s/√n
= 1.02
(a) What is the P-value of the test
(b) Should we reject the null hypothesis?
Mathematical statistics
![Page 18: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/18.jpg)
t-table
Mathematical statistics
![Page 19: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/19.jpg)
Interpreting P-values
A P-value:
is not the probability that H0 is true
is not the probability of rejecting H0
is the probability, calculated assuming that H0 is true, ofobtaining a test statistic value at least as contradictory to thenull hypothesis as the value that actually resulted
Mathematical statistics
![Page 20: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/20.jpg)
Two-sample inference
Mathematical statistics
![Page 21: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/21.jpg)
Two-sample inference: example
Example
Let µ1 and µ2 denote true average decrease in cholesterol for twodrugs. From two independent samples X1,X2, . . . ,Xm andY1,Y2, . . . ,Yn, we want to test:
H0 : µ1 = µ2
Ha : µ1 6= µ2
Mathematical statistics
![Page 22: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/22.jpg)
Settings
This lecture: independent samples
Assumption
1 X1,X2, . . . ,Xm is a random sample from a population with mean µ1
and variance σ21 .
2 Y1,Y2, . . . ,Yn is a random sample from a population with mean µ2
and variance σ22 .
3 The X and Y samples are independent of each other.
Next lecture: paired-sample test
Mathematical statistics
![Page 23: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/23.jpg)
Review Chapter 6 and Chapter 7
Problem
Assume that
X1,X2, . . . ,Xm is a random sample from a population withmean µ1 and variance σ2
1.
Y1,Y2, . . . ,Yn is a random sample from a population withmean µ2 and variance σ2
2.
The X and Y samples are independent of each other.
Compute (in terms of µ1, µ2, σ1, σ2,m, n)
(a) E [X − Y ]
(b) Var [X − Y ] and σX−Y
Mathematical statistics
![Page 24: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/24.jpg)
Properties of X − Y
Proposition
Mathematical statistics
![Page 25: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/25.jpg)
Normal distributions with known variances
Mathematical statistics
![Page 26: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/26.jpg)
Chapter 8: Confidence intervals
Assume further that the distributions of X and Y are normal andσ1, σ2 are known:
Problem
(a) What is the distribution of
(X − Y )− (µ1 − µ2)√σ2
1m +
σ22n
(b) Compute
P
−1.96 ≤ (X − Y )− (µ1 − µ2)√σ2
1m +
σ22n
≤ 1.96
(c) Construct a 95% CI for µ1 − µ2 (in terms of x , y , m, n, σ1,
σ2).
Mathematical statistics
![Page 27: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/27.jpg)
Confidence intervals
Mathematical statistics
![Page 28: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/28.jpg)
Testing the difference between two population means
Setting: independent normal random samples X1,X2, . . . ,Xm
and Y1,Y2, . . . ,Yn with known values of σ1 and σ2. Constant∆0.
Null hypothesis:H0 : µ1 − µ2 = ∆0
Alternative hypothesis:
(a) Ha : µ1 − µ2 > ∆0
(b) Ha : µ1 − µ2 < ∆0
(c) Ha : µ1 − µ2 6= ∆0
When ∆ = 0, the test (c) becomes
H0 : µ1 = µ2
Ha : µ1 6= µ2
Mathematical statistics
![Page 29: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/29.jpg)
Testing the difference between two population means
Problem
Assume that we want to test the null hypothesis H0 : µ1−µ2 = ∆0
against each of the following alternative hypothesis
(a) Ha : µ1 − µ2 > ∆0
(b) Ha : µ1 − µ2 < ∆0
(c) Ha : µ1 − µ2 6= ∆0
by using the test statistic:
z =(x − y)− (µ1 − µ2)√
σ21m +
σ22n
.
What is the rejection region in each case (a), (b) and (c)?
Mathematical statistics
![Page 30: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/30.jpg)
Testing the difference between two population means
Proposition
Mathematical statistics
![Page 31: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/31.jpg)
Practice problem
Each student in a class of 21 responded to a questionnaire thatrequested their GPA and the number of hours each week that theystudied. For those who studied less than 10 h/week the GPAs were
2.80, 3.40, 4.00, 3.60, 2.00, 3.00, 3.47, 2.80, 2.60, 2.00
and for those who studied at least 10 h/week the GPAs were
3.00, 3.00, 2.20, 2.40, 4.00, 2.96, 3.41, 3.27, 3.80, 3.10, 2.50
Assume that the distribution of GPA for each group is normal andboth distributions have standard deviation σ1 = σ2 = 0.6. Treatingthe two samples as random, is there evidence that true averageGPA differs for the two study times? Carry out a test ofsignificance at level .05.
Mathematical statistics
![Page 32: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/32.jpg)
Solution
Mathematical statistics
![Page 33: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/33.jpg)
Solution
Mathematical statistics
![Page 34: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/34.jpg)
Large-sample tests/confidence intervals
Mathematical statistics
![Page 35: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/35.jpg)
Principles
Central Limit Theorem: X and Y are approximately normalwhen n > 30 → so is X − Y . Thus
(X − Y )− (µ1 − µ2)√σ2
1m +
σ22n
is approximately standard normal
When n is sufficiently large S1 ≈ σ1 and S2 ≈ σ2
Conclusion:(X − Y )− (µ1 − µ2)√
S21m +
S22n
is approximately standard normal when n is sufficiently large
If m, n > 40, we can ignore the normal assumption andreplace σ by S
Mathematical statistics
![Page 36: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/36.jpg)
Large-sample tests
Proposition
Mathematical statistics
![Page 37: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/37.jpg)
Large-sample CIs
Proposition
Provided that m and n are both large, a CI for µ1 − µ2 with aconfidence level of approximately 100(1− α)% is
x − y ± zα/2
√s2
1
m+
s22
n
where −gives the lower limit and + the upper limit of the interval.An upper or lower confidence bound can also be calculated byretaining the appropriate sign and replacing zα/2 by zα.
Mathematical statistics
![Page 38: Mathematical statisticsvucdinh.github.io/S19/450/lecture28.pdf · 2020. 12. 15. · Week 10 Chapter 9, 10: Test of Hypothesis Week 14 Regression Mathematical statistics. Inferences](https://reader036.vdocument.in/reader036/viewer/2022071505/6125fee42bd0c9637b69ee01/html5/thumbnails/38.jpg)
Example
Example
Let µ1 and µ2 denote true average tread lives for two competingbrands of size P205/65R15 radial tires.
(a) Test
H0 : µ1 = µ2
Ha : µ1 6= µ2
at level 0.05 using the following data: m = 45, x = 42, 500,s1 = 2200, n = 45, y = 40, 400, and s2 = 1900.
(b) Construct a 95% CI for µ1 − µ2.
Mathematical statistics