Professional Documents
Culture Documents
Biometris
Quantitative Methods brought to Life
Today’s lecture
Refresher session on
● Hypothesis testing: t-tests
● One sample t-test
● Paired t-test
● Two samples t-test
● Confidence intervals
Biometris
2
Quantitative Methods brought to Life
Tape worms in sheep (Ex. 6.3, p. 298 O&L)
Researchers want to investigate the effectiveness of a new
drug for tape worms in the stomach of sheep.
A random sample of 24 sheep are randomly divided into
two groups.
One group receives the new drug, the other group
receives no treatment.
After 6 months, the lambs are slaughtered and the worms
are counted.
3
Setup
• We cannot look at all sheep, but make a guess about the difference
between the populations looking at two random samples from the
populations.
• We have one random sample of sheep receiving the new drug, and
another random sample of sheep receiving no treatment.
4
and
6
The test statistic
• The test statistic measures how well the data match up with
7
Outcome of the test statistic in the sheep example
14.11
8
The rejection region
distribution of t under
usually
0
Reject when outcome of test statistic t is too small (very
negative).
William Gosset
& Ronald Fisher
with
11
The P-value
P-value =
13
two sided HA: critical region
distribution of t under
usually
0
Reject when outcome of test statistic t is too large (very
positive), or too small (very negative).
Together, the red and green areas form the rejection region;
the outcomes of t that lead to rejection of .
14
two sided HA: critical region
Rejection region:
all outcomes of t smaller than –2.074, and
all outcomes of t larger than +2.074.
15
two sided HA: p-value
Left tail
Right tail
P-value =
16
Equal variances or not?
18
SPSS
( y1 y 2 ) 2 P (| t | | t obs |
t
1 1 two sided P value 1 1
sp ( ) sp ( )
n1 n2 n1 n 2
H 0 : 12 2
2
H A : 12 22
y1 y 2
y1 y 2
t' s 12 s 22
s 12 s 22
2 P (| t ' | | t ' obs |) n1 n2
n1 n2
two sided P value
19
General structure of t statistic
20
Other t-tests: one sample
, t-distr. df = ( )
21
Other t-tests: paired data
Paired t-test
one random sample, two (dependent) observations per unit
interest in difference between population means ,
, t-distr. df = ( )
22
Steps in testing
1. mention H0 and Ha
2. mention the test statistic
3. mention the behaviour of the test statistic,
e.g. under H0 a t distribution and large values expected under Ha,
4. mention the type of critical region (or rejection region, RR): left, right or two-sided
5. give the critical region for a given α (often α = 0.05), or 5alt. value of test statistic
6. give the value of the test statistic, or 6alt. determine the P-value
7. is this value in the critical region? or 7alt. P-value below α?
25
Confidence interval and t-test
t-distr.
df = 22
estimate = 26.58 - 39.67 = -13.03 constant = 2.074
0.95-confidence interval:
27
Confidence interval for the sheep example
0.95-CI:
28