Anda di halaman 1dari 10

Stat 463

Testing 1: Ch. 5.5, 5.6

5.5. Introduction to Hypothesis Testing


Ex (5.5.1) Heights of zea mays: Charles Darwin (1878)
Compare the effect of cross-fertilized or self-fertilized on
the height.
Researchers hypothesis: cross-fertilized plants are taller
than self fertilized plant
Data:
iid

W1 = X1 Y1, , W15 = X15 Y15 f (w) ,


Hypotheses where E(Wi) =
H0 : = 0 vs

H1 : > 0

iid

Ex: Let X1, , Xn N (, 100).


Past Experience: H0 : 75 [Null Hypothesis]
New Conjecture: H1 : > 75 [Alternative Hypothesis]
Want to find rule that makes possible for us to choose
one of these Hypotheses. The rule is called test of the
hypothesis H0 against hypothesis H1.
0

Stat 463

Testing 1: Ch. 5.5, 5.6

The rule is decided by partitioning the sample space


D into C [Critical Region] and C . If the realized data
(x1, , xn) C, we shall reject H0, if not, accept H0.
Consider the following three tests.
Test 1. n = 25. The sample space is, then,
{(x1, , x25) : < xi < , i = 1, , n}.
The C is
C = {(x1, , x25) : x
> 75}.
The power function (?) of this test is
> 75].
K1() = P r[(X1, , X25) C] = P r[X


X
75
K1() = P r
>
2
2
K1( = 75) = 0.5

75
=1
2
Desirable ?

Stat 463

Testing 1: Ch. 5.5, 5.6

Test 2 The critical region C is


C = {(x1, , x25) : x
> 78}.
The power function of test 2 is

78
> 78] = 1
K2() = P r[X
2

K2( = 75) = 0.067 , K2( = 77) = 0.309


Test 3 Let n = 100 and the critical region C be
C = {(x1, , x25) : x
> 76}.
The power function of test 3 is

76

K3() = P r[X > 76] = 1


1

K3( = 75) = 0.159 , K2( = 77) = 0.841


See the Figure
Definitions
Statistical Hypothesis A Statistical Hypothesis is an assertion about the distribution of one or more random variables. If the statistical hypothesis completely specifies the
2

Stat 463

Testing 1: Ch. 5.5, 5.6

distribution, it is called a simple hypothesis; if it does not,


it is called a composite statistical hypothesis
H0 : 0

vs

H1 : 1

Test A test of a statistical hypothesis is a rule which, when


the sample values have been obtained, leads to a decision
to accept or reject the hypothesis under consideration.
Critical Region Let C be that subset of the sample space
which, in accordance with a prescribed test, leads to the
rejection of the null hypothesis. Then C is called the critical region of the test.
Errors: Type I and Type II
True State of Nature
Decision
Reject H0

H0 is true
Type I error

H1 is true
Correct

Accept H0

Correct

Type II error

Power and Power Function The power of the test at the


point is
1 P [Type II error] = P [(X1, , Xn) C]
3

Stat 463

Testing 1: Ch. 5.5, 5.6

The power function of a critical region C of the test is


C () = P [(X1, , Xn) C] : 1
Significance Level (Size) The significance level of the
test is the supremum of the power of the test when H0
is true.
= max P [(X1, , Xn) C]
H
0

iid

Ex (B5.5.2) Size test for the probability p: X1, , Xn


b(1, p)
H0 : p = p0

vs

H1 : p < p0

Reject H0 if
S=

n
X

Xi

i=1

where k satisfied
= P H0 [

] .

For a given k, What is if H0 : p p0 ?


max P [
H0

]=

Figure 5.5.1.] Test 1: k = 11 Test 2: k = 12


4

Stat 463

Testing 1: Ch. 5.5, 5.6


iid

Ex (B5.5.4)Size test for the mean : X1, , Xn


N (, 2) Unknown 2.
H0 : = 0

vs

H1 : > 0

iid

Ex (P5.5.8) X1, , Xn N (, 50002). Consider the


hypotheses
H0 : = 30, 000

vs

H1 : > 30, 000

When do you try to reject H0 (accept H1) ?


How can we define the constants c ?

Stat 463

Testing 1: Ch. 5.5, 5.6


iid

Ex (P5.5.12) X1, , X8 P oisson().


H0 : = 0.5

vs

P8
Reject H0 if i=1 xi 8.

H1 : > 0.5

Stat 463

Testing 1: Ch. 5.5, 5.6

5.6. Additonal Comments


iid

Ex (B5.6.1) Large Sample Two-Sided Test: X1, , Xn


f (x) with mean and unknown variance 2. n is large.
Want to test
H0 : = 0

vs

H1 : 6= 0

When do you try to reject H0 (accept H1) ?

Power function
() =
What if the distribution is a normal distribution and n is not
large?

Stat 463

Testing 1: Ch. 5.5, 5.6

Relationship with confidence interval

iid

iid

Ex (B5.6.2) X1, , Xn1 N (1, 12) and Y1, , Yn2


N (2, 22). Unknown 12 and 22.
H0 : 1 = 2

vs

H1 : 1 2

Y
, S12 and S22, When do you try to reject H0
Given X,
(accept H1) ?

iid

Ex (B5.6.4) Randomized Test: X1, , X10 P oisson().


H0 : = 0.1

vs

H1 : > 0.1

Test 1: Reject H0 if Y =

P10
i=1 Xi 3, =

Test 2: Reject H0 if Y =

P10
i=1 Xi 4, =

Exact size = 0.05 test ?


8

Stat 463

Testing 1: Ch. 5.5, 5.6

p-value or observed significance level:


p-value is the observed tail probability of statistic being at
least as extreme as the particular observed value when
H0 is true.In other words, it is the probability, if the test
statistic really were distributed as it would be under the
null hypothesis, of observing a test statistic [as extreme
as, or more extreme than] the one actually observed.
For example, if critical region is given as
u(x1, , xn) c,
and the observed value of u(x1, , xn) is d, then the
p-value is
p value = P [Y = u(X1, , Xn) d : H0]
Small p-value: Strong evidence to reject H0.
iid

Ex (B5.6.5) X1, , X25 N (, 2 = 4)


H0 : = 77

vs

H1 : < 77

Anda mungkin juga menyukai