Download Class 2 - Courses

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Bootstrapping (statistics) wikipedia , lookup

Degrees of freedom (statistics) wikipedia , lookup

Foundations of statistics wikipedia , lookup

Psychometrics wikipedia , lookup

Omnibus test wikipedia , lookup

Misuse of statistics wikipedia , lookup

Resampling (statistics) wikipedia , lookup

Student's t-test wikipedia , lookup

Transcript
AMS7: WEEK 7. CLASS 2
Hypothesis Testing for Two Populations.
Paired samples.
Wednesday May 13, 2015
More on hypothesis testing
• Inference about two means:
Independent samples vs. Dependent samples
Dependent samples (Matched Pairs)
Members of one sample can be used to determine
members of the other sample
Examples
1) The effectiveness of a drug on the cure of certain
disease is tested by measuring the symptoms of the
disease in a group of patients treated with the drug and
another group of patients given a placebo
Independent
2)
The effectiveness of a drug on the cure of certain
disease is tested by measuring the symptoms of the
disease before and after the drug treatment. Data
consists of the before/after measurements for each
patient
Dependent
Example: Independent samples
• Treating a disease: Bipolar Depression
• Measurements: Hamilton depression scale
• Problem Data
Placebo Group
Treatment Group
n1=43, = 21.57
n1=33, = 20.38
s1= 3.87
s2=3.91
• Claim: Placebo Group and Treatment group do not show
differences: = Steps for the Test
1) Requirements:
Two independent simple random samples
n1 and n2>30. Assume normality
2) Set Hypothesis
Ho: = H1 : ≠ (Original Claim)
3) Test statistic:
( − ) − ( − )
=
1 2
+
1
2
Steps for the Test (Cont.)
Ho is assumed
TRUE
Test Statistic
=
(21.57 − 20.38) − (0)
3.87 3.91
+
43
33
= 1.321
4) Critical Value:
Two-tailed test. =0.05. /2=0.025. Degrees of freedom (df):
n1-1=42, n2-1=32. Take the smaller value
d.f.=32
ഀ⁄మ = 2.037
-ഀ⁄మ = - 2.037
Steps for the Test (Cont.)
• Critical region: Values of the test statistic greater than
2.037 or lower than -2.037
• P-Value: Area to the right of 1.321 and to the left of
-1.321= 2*(1-0.9020648)= 0.196 (found with a statistical
package)
ߙ/2
Critical Region -2.037 -1.321
ߙ/2
1.321 2.037
Critical Region
Steps for the Test (Cont.)
• 5) Decision:
-We fail to reject Ho because the test statistic does not fall
in the Critical Region.
- The p-Value is greater than 0.05. We fail to reject Ho
using the p-Value method. The results are the same!
6) Conclusion: There is not sufficient evidence from the
sample to warrant rejection of the claim. Treatment does
not appear to be effective.
Other possibilities for the two independent
means test
• Normally and are unknown. But if they are known
and ≠ , the test statistics is:
z=
(భ మ )(భ మ )
మ
഑మ
భ ഑మ
೙భ ೙మ
(use the normal distribution)
• Confidence Interval:
(̅ − ̅ ) − E <1-2 < (̅ − ̅ ) + E
Where E = / ×
భమ
+
మమ
.
Other possibilities for the two independent
means test (Cont.)
• If = but unknown, use a pooled estimate for the
variance:
1 − 1 1 + (2 − 1)2
=
1 − 1 + (2 − 1)
• The test statistics is:
t=
(భ మ )(భ మ )
ೞ೛ మ ೞ೛ మ
೙భ ೙మ
With degrees of freedom= n1+n2-2
Inference about Matched Pairs
• Sample data consists of matched pairs
• Simple Random Samples
• n>30 (# of pairs) or samples from a normal distribution
Notation:
• d: Difference between two values
• d: Population mean of the differences
• ̅ : Sample mean of the differences
• Sd: Standard deviation of the differences
• n: number of pairs
Inference about Matched Pairs (Cont.)
• Test Statistic
೏
= ೄ೏
೙
with n-1 degrees of freedom
• Confidence Interval
• ̅ − < < ̅ + • E=
೏
ഀ⁄మ Example: Matched Pairs
• Sec. 8.4 #6
Self-reported and measure female height.
a) Is there sufficient evidence to support the claim that
there is a difference between self-reported heights and
measured heights of females aged 12-16? Use =0.05
Repor
ted
53
64
61
66
64
65
68
63
64
64
64
67
Meas
ured
58.1
62.7
61.1
64.8
63.2
66.4
67.6
63.5
66.8
63.9
62.1
68.5
Diff (d)
-5.1
1.3
-0.1
1.2
0.8
-1.4
0.4
-0.5
-2.8
0.1
1.9
-1.5
Example: Matched Pairs (Cont.)
1) Claim:
≠ 0
Ho: = 0 H1: : ≠ 0
∑
.
̅
2) ∑ = −5.7 =
=
=-0.475
=
∑ ( − ̅ )
=
−1
43.168
= 1.981
11
3) Test Statistic:
೏
= ೄ೏
೙
=
.
భ.వఴభ
భమ
= -0.831
Example: Matched Pairs (Cont.)
4) Critical Values:
t 0.025= 2.201
-t 0.025=-2.201
(d.f.=n-1=12-1=11)
Critical Region: Values of the test statistic greater than
2.201 and lower than -2.201
5) Decision: Test statistic does not fall in the critical region.
Fail to Reject Ho
6) Conclusion: We do not have sufficient evidence to
support the claim that there is a difference between selfreported heights and measured heights.
Example: Matched Pairs (Cont.)
Find a 95% Confidence Interval for d
• E=
೏
ഀ⁄మ =
.
2.201⨯
=
1.26
• -0.475−1.26 < < −0.475 + 1.26
• -1.735< < 0.785
• The CI contains the value of zero
reject the Null Hypothesis
Fail to