Professional Documents
Culture Documents
1
Main Objectives
1. population proportion p
2. population mean
3. population standard deviation
2
Example
Claim: the XSORT method of gender
selection increases the likelihood of having a
baby girl.
This is a claim about proportion (of girls)
To test this claim 14 couples (volunteers) were
subject to XSORT treatment.
If 6 or 7 or 8 have girls, the method probably
does not increase the likelihood of a girl.
If 13 or 14 couples have girls, the method is
probably increases the likelihood of a girl.
3
Rare Event Rule for
Inferential Statistics
4
Components of a
Formal
Hypothesis Test
5
Null Hypothesis: H0
The null hypothesis (denoted by H0)
is a statement that the value of a
population parameter (such as
proportion, mean, or standard
deviation) is equal to some claimed
value.
We test the null hypothesis directly.
Either reject H0 or fail to reject H0
(in other words, accept H0 ).
6
Alternative Hypothesis: H1
7
Example 1
8
Example 1 (continued)
We always test the null hypothesis.
If we reject the null hypothesis, then the original
clam is accepted.
Final conclusion would be: XSORT method
increases the likelihood of having a baby girl.
If we fail to reject the null hypothesis, then the
original clam is rejected.
Final conclusion would be: XSORT method
does not increase the likelihood of having a
baby girl.
9
Example 2
Claim: for couples using the XSORT method
the likelihood of having a baby girl is 50%
10
Example 2 (continued)
If we reject the null hypothesis, then the
original clam is rejected.
Final conclusion would be: for couples using
the XSORT, the likelihood of having a baby
girl is not 0.5
If we fail to reject the null hypothesis, then the
original clam is accepted.
Final conclusion would be: for couples using
the XSORT the likelihood of having a baby
girl is indeed equal to 0.5
11
Example 3
Claim: for couples using the XSORT method the
likelihood of having a baby girl is at least 0.5
12
Example 3 (continued)
If we reject the null hypothesis, then the
original clam is rejected.
Final conclusion would be: for couples using
the XSORT, the likelihood of having a baby
girl is less 0.5
If we fail to reject the null hypothesis, then the
original clam is accepted.
Final conclusion would be: for couples using
the XSORT the likelihood of having a baby
girl is indeed at least 0.5
13
General rules:
If the null hypothesis is rejected, the
alternative hypothesis is accepted.
If the null hypothesis is accepted, the
alternative hypothesis is rejected.
Acceptance or rejection of the null
hypothesis is an initial conclusion.
Always state the final conclusion
expressed in terms of the original claim,
not in terms of the null hypothesis or the
alternative hypothesis.
14
Type I Error
15
Type II Error
16
Type I and Type II Errors
17
Example
Claim:
a new medicine has a greater success
rate, p>p0, than the old (existing) one.
18
Example (continued)
Type I error: the null hypothesis is true, but
we reject it => we accept the claim, hence
we adopt the new (inefficient, potentially
harmful) medicine.
This is a critical error, should be avoided!
19
Significance Level
20
Testing hypothesis
Step 1: compute Test Statistic
21
Section 8-3
22
Notation
n = number of trials
x
p = n (sample proportion)
p = population proportion (must be
specified in the null hypothesis)
q=1p
23
Requirements for Testing Claims
About a Population Proportion p
1) The sample observations are a simple
random sample.
2) The conditions for a binomial distribution
are satisfied.
3) The conditions np 5 and nq 5 are both
satisfied, so the binomial distribution of
sample proportions can be approximated
by a normal distribution with = np and
= npq . Note: p is the assumed
proportion not the sample proportion.
24
Test Statistic for Testing
a Claim About a Proportion
pp
z= pq
n
Note: p is the value specified
in the null hypothesis; q = 1-p
25
Example 1 again:
p 13 14 0.929
p p 0.929 0.5
z 3.21
pq 0.5 0.5
n 14
27
Draw the diagram (the normal curve)
On the diagram, mark a region of extreme
values that agree with the alternative
hypothesis:
28
Critical Region
29
Critical Value
30
Significance Level
31
Conclusion of the test
32
Types of Hypothesis Tests:
Two-tailed, Left-tailed, Right-tailed
33
Right-tailed Test
H0: p=0.5 is in the right tail
H1: p>0.5
Points Right
34
Critical value for a
right-tailed test
35
Left-tailed Test
H0: p=0.5 is in the left tail
H1: p<0.5
Points Left
36
Critical value for a
left-tailed test
37
Two-tailed Test
H0: p=0.5 is divided equally between
H1: p0.5
the two tails of the critical
region
38
Critical values for a
two-tailed test
39
P-Value
40
Example 1 (continued)
P-value = 0.0007
41
P-Value method:
42
Example 1 (continued)
P-value = 0.0007
43
P-Value
44
Procedure for Finding P-Values
Figure 8-5
45
Caution
p = population proportion
46
Traditional method:
47
P-Value method:
48
Testing hypothesis by TI-83/84
Press STAT and select TESTS
Scroll down to 1-PropZTest press ENTER
Type in p0: (claimed proportion, from H0)
x: (number of successes)
n: (number of trials)
choose H1: p p0 <p0 >p0
(two tails) (left tail) (right tail)
Press on Calculate
Read the test statistic z=
and the P-value p= 49
Do we prove a claim?
50
Section 8-4
51
Notation
n = sample size
x = sample mean
52
Requirements for Testing Claims About
a Population Mean (with Known)
53
Test Statistic for Testing a Claim
About a Mean (with Known)
x
z=
n
54
Example:
People have died in boat accidents because an
obsolete estimate of the mean weight of men
(166.3 lb) was used.
55
Example:
Requirements are satisfied: is known
(26 lb), sample size is 40 (n > 30)
56
Example:
Next we calculate z
x x 172.55 166.3
z 1.52
26
n 40
It is a right-tailed test, so P-value is
the area is to the right of z = 1.52;
57
Example:
Table A-2: area to the left of z = 1.52
is 0.9357, so the area to the right is
1 0.9357 = 0.0643.
The P-value is 0.0643
The P-value of 0.0643 is greater than
the significance level of = 0.05, we
fail to reject the null hypothesis.
P-value = 0.0643
= 166.3
or x 172.55
z=0 or
z = 1.52
58
Example:
59
Testing hypothesis by TI-83/84
Press STAT and select TESTS
Scroll down to Z-Test press ENTER
Choose Data or Stats. For Stats:
Type in 0: (claimed mean, from H0)
: (known st. deviation)
x: (sample mean)
n: (sample size)
choose H1: 0 <0 >0
(two tails) (left tail) (right tail)
60
(continued)
Press on Calculate
Read the test statistic z=
and the P-value p=
61
Section 8-5
62
Notation
n = sample size
x = sample mean
63
Requirements for Testing Claims
About a Population
Mean (with Not Known)
64
Test Statistic for Testing a
Claim About a Mean
(with Not Known)
x
t= s
n
P-values and Critical Values
Found in Table A-3 or by calculator
Degrees of freedom (df) = n 1
65
Example:
People have died in boat accidents because an
obsolete estimate of the mean weight of men
(166.3 lb) was used.
66
Example:
Requirements are satisfied: is not
known, sample size is 40 (n > 30)
67
Example:
Next we calculate t
x x 172.55 166.3
t 1.501
s 26.33
n 40
df = n 1 = 39
area of 0.05, one-tail yields
critical value t = 1.685;
68
Example:
t = 1.501 does not fall in the critical
region bounded by t = 1.685, we fail
to reject the null hypothesis.
= 166.3
or Critical value
z=0 t = 1.685
x 172.55
or
t = 1.52
69
Example:
Final conclusion:
70
Normal Distribution Versus
Student t Distribution
The critical value in the preceding example
was t = 1.782, but if the normal distribution
were being used, the critical value would have
been z = 1.645.
71
P-Value Method
72
Testing hypothesis by TI-83/84
Press STAT and select TESTS
Scroll down to T-Test press ENTER
Choose Data or Stats. For Stats:
Type in 0: (claimed mean, from H0)
x: (sample mean)
sx: (sample st. deviation)
n: (sample size)
choose H1: 0 <0 >0
(two tails) (left tail) (right tail)
73
(continued)
Press on Calculate
Read the test statistic t=
and the P-value p=
74
Section 8-6
75
Notation
n = sample size
s = sample standard deviation
s2 = sample variance
= claimed value of the population standard
deviation (from H0 )
2 = claimed value of the population
variance (from H0 )
76
Requirements for Testing
Claims About or 2
77
Chi-Square Distribution
Test Statistic
2
n 1s 2
78
Critical Values for
Chi-Square Distribution
79
Table A-4
Table A-4 is based on cumulative areas
from the right.
Critical values are found in Table A-4 by
first locating the row corresponding to the
appropriate number of degrees of freedom
(where df = n 1).
Next, the significance level is used to
determine the correct column.
The following examples are based on a
significance level of = 0.05.
80
Critical values
Right-tailed test: needs one critical value
Because the area to the right of the
critical value is 0.05, locate 0.05 at the
top of Table A-4.
Area 1- Area
critical value
81
Critical values
Left-tailed test: needs one critical value
With a left-tailed area of 0.05, the area to
the right of the critical value is 0.95, so
locate 0.95 at the top of Table A-4.
Area Area 1-
1-
critical value
82
Critical values
Two-tailed test: needs two critical values
Critical values are two different positive
numbers, both taken from Table A-4
Divide a significance level of 0.05 between
the left and right tails, so the areas to the
right of the two critical values are 0.975
and 0.025, respectively.
Locate 0.975 and 0.025 at top of Table A-4
83
Critical values for a two-tailed test
Area
Area 1- Area
left critical value right critical value
84
Finding a range for P-value
A useful interpretation of the P-value: it is
observed level of significance.
Compare your test statistic 2 with critical
values shown in Table A-4 on the line with
df=n-1 degrees of freedom.
Find the two critical values that enclose your
test statistic. Determine the significance
levels 1 and 2 for those two critical values.
Your P-value is between 1 and 2
(see examples below)
85
Examples:
Right-tailed test: If the test statistic 2 is
between critical values corresponding to
the areas 1 and 2 , then your P-value
is between 1 and 2 .
Left-tailed test: If the test statistic 2 is
between critical values corresponding to
the areas 1-1 and 1-2 , then your
P-value is between 1 and 2 .
86
Examples:
Two-tailed test: If the test statistic 2 is
between critical values corresponding to
the areas 1 and 2 , then your P-value
is between 21 and 22 .
Two-tailed test: If the test statistic 2 is
between critical values corresponding to
the areas 1-1 and 1-2 , then your
P-value is between 21 and 22 .
(Note: for two-tailed tests, multiply the
areas by two)
87
Finding the exact P-value by TI-83/84
Use the test statistic 2 and the calculator function
2 cdf to compute the area of the tail: