Docsity

Understanding Hypothesis Testing: Null Hypothesis, Alternate Hypothesis, Test Statistic, Study notes of Mathematical Statistics

Toggle sidebar
bg1
Stat 312: Lecture 10
Hypothesis testing
Moo K. Chung
Feb 20, 2003
Concepts
1. The null hypothesis H0is a claim about the
value of a population parameter. The alternate
hypothesis H1is a claim opposite to H0.
2. A test of hypothesis is a method for using sam-
ple data to decide whether to reject H0.H0
will be assumed to be true until the sample
evidence suggest otherwise.
3. A test statistic is a function of the sample data
on which the decision is to be based.
4. A rejection region is the set of all values of a
test statistic for which H0is rejected.
5. Type I error: you reject H0when H0is true.
P(Type I error) = P(reject H0|H0true) = α.
The resulting αis called the significance level
of the test and the corresponding test is called
alevel αtest. We will use test procedures that
give αless than a specified level (0.05 or 0.01).
In-class problem
I believe that dogs are as smart as people. Assume
IQ of a dog follows Xi∼N(µ, 102). IQ of 10 dogs
are measured: 30, 25, 70, 110, 40, 80, 50, 60, 100,
60. We want to test if dogs are as smart as people
by testing
H0:µ= 100 vs. H1:µ < 100.
One reasonable thing one may try is to see how high
the sample mean is.
> x<-c(30, 25, 70, 110, 40, 80, 50, 60,
100, 60)
> mean(x)
[1] 62.5
Since the average IQ of 10 dogs are lower than 100,
one would be inclined to reject H0.
Let ¯
Xbe a test statistic and R= (−∞,90] to
be a rejection region. Let’s compute the probabil-
ity of making Type I error based on this testing
procedure. Under the assumption H0is true,
Xi∼N(100,102).
Under this condition, ¯
X∼N(100,10) and
α=P(¯
X≤90).
> pnorm(90,100,sqrt(10))
[1] 0.0007827011
By using this test procedure, it is highly unlikely to
make Type I error. Let’s see what happens when
we change the rejection region.
When R= (−∞,95], α=P(¯
X≤95).
> pnorm(95,100,sqrt(10))
[1] 0.05692315
When R= (−∞,99], α=P(¯
X≤99).
> pnorm(99,100,sqrt(10))
[1] 0.3759148
The test procedure based on rejecting H0if ¯
X≤99
will produce huge Type I error. Why?
Self-study problems
Example 8.1., 8.2., 8.3., 8.4., 8.5. Do not compute
β.

Partial preview of the text

Download Understanding Hypothesis Testing: Null Hypothesis, Alternate Hypothesis, Test Statistic and more Study notes Mathematical Statistics in PDF only on Docsity!

Stat 312: Lecture 10

Hypothesis testing

Moo K. Chung

[email protected]

Feb 20, 2003

Concepts

  1. The null hypothesis H 0 is a claim about the value of a population parameter. The alternate hypothesis H 1 is a claim opposite to H 0.
  2. A test of hypothesis is a method for using sam- ple data to decide whether to reject H 0. H 0 will be assumed to be true until the sample evidence suggest otherwise.
  3. A test statistic is a function of the sample data on which the decision is to be based.
  4. A rejection region is the set of all values of a test statistic for which H 0 is rejected.
  5. Type I error: you reject H 0 when H 0 is true. P (Type I error) = P (reject H 0 |H 0 true) = α. The resulting α is called the significance level of the test and the corresponding test is called a level α test. We will use test procedures that give α less than a specified level (0.05 or 0.01).

In-class problem

I believe that dogs are as smart as people. Assume IQ of a dog follows Xi ∼ N (μ, 102 ). IQ of 10 dogs are measured: 30, 25, 70, 110, 40, 80, 50, 60, 100,

  1. We want to test if dogs are as smart as people by testing

H 0 : μ = 100 vs. H 1 : μ < 100.

One reasonable thing one may try is to see how high the sample mean is.

x<-c(30, 25, 70, 110, 40, 80, 50, 60, 100, 60)

mean(x) [1] 62.

Since the average IQ of 10 dogs are lower than 100, one would be inclined to reject H 0. Let X¯ be a test statistic and R = (−∞, 90] to be a rejection region. Let’s compute the probabil- ity of making Type I error based on this testing procedure. Under the assumption H 0 is true,

Xi ∼ N (100, 102 ).

Under this condition, X¯ ∼ N (100, 10) and

α = P ( X¯ ≤ 90).

pnorm(90,100,sqrt(10)) [1] 0.

By using this test procedure, it is highly unlikely to make Type I error. Let’s see what happens when we change the rejection region. When R = (−∞, 95], α = P ( X¯ ≤ 95).

pnorm(95,100,sqrt(10)) [1] 0.

When R = (−∞, 99], α = P ( X¯ ≤ 99).

pnorm(99,100,sqrt(10)) [1] 0.

The test procedure based on rejecting H 0 if X¯ ≤ 99 will produce huge Type I error. Why?

Self-study problems

Example 8.1., 8.2., 8.3., 8.4., 8.5. Do not compute β.