Sie sind auf Seite 1von 39

Ade Syaheda Wani Binti Marzuki

Faculty of Engineering
Semester 1 (2010/2011)

Introduction

Hypothesis testing using test statistic

Testing a population mean


Test statistic

Testing a population proportion

Testing
variance
g a population
p p

KNF2053
Numerical Methods and Statistics

Statistical hypothesis

An assertion or conjecture concerning one


or more random variable. It is frequently
d
denoted
db
by symbol
b l H0 or H1.

Null hypothesis, H0

A claim
l i ((or statement)) about
b
l i
a population
parameter that is assumed to be true until
it is declared false
KNF2053
Numerical Methods and Statistics

Alternative hypothesis, H1
The hypothesis that we will accept if we
decide to reject the null hypothesis
Test statistic
A value computed from sample data
Rejection area (critical area)
Indicates the value of the test statistic that
will imply rejection of null hypothesis
KNF2053
Numerical Methods and Statistics

Acceptance region
The range that H0 will not be rejected if the
value of test statistic falls into it.
Critical point
The border of the rejection region
Decision Rule
Test statistics
Null hypothesis or alternative hypothesis
Acceptance region or critical region

KNF2053
Numerical Methods and Statistics

Whenever we draw inferences about a


population,
there
is a risk
l
h
k that
h incorrect
conclusion will be reached.
Type I error

Rejection of the null


hypothesis when it is
true
Al
l h
Also k
known as alpha
error
yp I error)) =
P ((type

Type II error

Acceptance of the
null hypothesis when
it is false
Al
Also k
known as b
beta
error
yp II error)) =
P ((type
KNF2053
Numerical Methods and Statistics

Power
The probability of rejecting the null
hypothesis, H0 when in fact H1 is false.
Given by (1-)

Summary of error
A
t H0
Accept
Reject H0

H0 is true
C
t
Correct
decision
Type I error

H0 is false
T
Type II error
Correct decision
KNF2053
Numerical Methods and Statistics

Example: Alternative hypothesis


One sided hypothesis

H1:
>3o
or H1:
<3

Two sided hypothesis

Test
est bot
both pos
positive
t e
and negative effect
simultaneously
H1 : 3

KNF2053
Numerical Methods and Statistics

Procedure:

State the null hypothesis, H0 that = 0


Choose an appropriate alternative hypothesis H1
from one of the alternatives < 0, > 0 or
0,
Choose a significant level of size
Select the appropriate test statistic and establish
the critical region
Compute the value of the test statistic from the
sample data
Make decision. Follow decision rule
KNF2053
Numerical Methods and Statistics

A manufacturer of a certain brand of rice


cereall claims
that
l i
h the
h average saturated
d fat
f
content does not exceed 1.5 miligrams. State
the null and alternative hypotheses to be
used in testing this claim and determine
where the critical region located

KNF2053
Numerical Methods and Statistics

The manufacturers claim should be


rejected
1.5
d only
l iff is greater than
h
milligrams and should be accepted if is
equal or less than 1.5
1 5 milligrams.
milligrams Since the
null hypothesis always specifies a single
value of the parameter, we test
H0: = 1.5
H1: > 1.5

acceptance
region

critical
region

1.5

KNF2053
Numerical Methods and Statistics

Introduction

Hypothesis testing using test statistic

Testing a population mean

Normal and
large sample

Small sample

Testing a population proportion

Testing
variance
g a population
p p

KNF2053
Numerical Methods and Statistics

One-Tailed Test
H 0 : 0
H1 : 0 ( H1 : 0 )

Test statistic:

X 0

/ n

(Normal population and


known)

X 0
S/ n

(Large sample and unknown)

C i i l region:
Critical
i
Z > Z (or
(
Z < Z
Z )
KNF2053
Numerical Methods and Statistics

Lets say the mean price for product A is


RM 13.25.
13 25 A random sample of 100 product
prod ct
A are taken and this sample has a mean
price of RM13.35.
RM13 35 Test the hypothesis that
the price of product A is equal or less than
RM 13.25 by
y assuming
g the is RM0.50, at
0.01 level of significance.

KNF2053
Numerical Methods and Statistics

List all information


RM 13.25
RM 0.50
0.01

n 100
x RM 13.35

State the null hypothesis and alternative


hypothesis
RM 13.25

H 0 : RM 13.25
H1 : RM 13.25
RM 13.25

KNF2053
Numerical Methods and Statistics

Identify significance level,


0.01
Find the critical region, by referring to
Table XX.
Z 2.3236
acceptance
region

rejection
region
Z > 2.3236

X 0
Compute test statistic value by using Z
/ n
2.3236

X 13.35 13.25
Z

2
/ n
0.5 / 100

KNF2053
Numerical Methods and Statistics

Compare the test statistic value and critical


region.
region Does it satisfies the region condition?

Critical region : Z 2.3236

Z (test statistic
i i )2
acceptance
region

rejection
region
Z > 2.3236

2 2.3236

If yes, then reject H0,


If not, accept H0

Accept H 0 because Z does not lies within the rejection region


KNF2053
Numerical Methods and Statistics

Two-Tailed Test
H 0 : 0
H1 : 0

Test statistic:

X 0

/ n

(Normal population and


known)

X 0
S/ n

(Large sample and unknown)

C i i l region:
Critical
i
|Z| > Z/2
KNF2053
Numerical Methods and Statistics

A student claims that the mean weight of a


parcel is 8 kg with
ith a standard deviation
de iation of
=0.5 kg. If a random sample of 50
reference books with a mean of 7.8
7 8 kg are
taken, test the hypothesis that each books
weight
g
is 8kg.
g Use a 0.01 level of
significance.

KNF2053
Numerical Methods and Statistics

List all information


8kg
0.50
0.01

n 50
x 7.8kgg

State the null hypothesis and alternative


hypothesis
we only accept

if mean = 8kg

H 0 : 8kg

reject if mean < 8kg


and if mean >8kg

H1 : 8kg
8kg

KNF2053
Numerical Methods and Statistics

Identify significance level,


0.01
Find the critical region, by referring to Table
A8 or Table 4.
Z 2.575 and Z 2.575
acceptance region
-2.575 < Z < 2.575
rejection region
Z<-2.575 and Z>2.57

-2.575

2.575

KNF2053
Numerical Methods and Statistics

Compute test statistic value by using


Z

X
7.8 8

2.83
/ n 0.5 / 50

X 0
/ n

Compare the test statistic value and critical


region.
acceptance region
-2.575
5 5 < Z < 2.575
5 5
2 83 are in rejection
-2.83
region

Decision?
Reject
j
H0 and accept
p H1

rejection region
Z< 2 575 and Z>2
Z<-2.575
Z>2.575
575
-2.575 2.575
-2.83 ( from test statistic
calculation)

KNF2053
Numerical Methods and Statistics

(n<30)

One-Tailed Test
H 0 : 0
H1 : 0 ( H1 : 0 )
Test statistic:

X
t
S/ n
Critical region:
t > t (or
(
t < tt )

Two tailed Test


H 0 : 0
H1 : 0
Test statistic:

X
t
S/ n
Critical region:
|t| > t/2
KNF2053
Numerical Methods and Statistics

One way hypothesis testing


Test the hypothesis
yp
that the average
g content
of containers of a particular lubricant is less
than 10 liters if the contents of a random
sample of 10 containers are 10.2, 9.7, 10.1,
10.3, 10.1, 9.8, 9.9, 10.4, 10.3 and 9.8 liters.
Use a 0
01 level of significance and assume
0.01
that the distribution of contents is normal.
KNF2053
Numerical Methods and Statistics

List all information


10 litre
0.01

n 10

Find mean and standard for the sample


deviation
X 10.06

and 0.245

S
h null
ll h
h i and
d alternative
l
i
State the
hypothesis
volume 10 litre
hypothesis

H 0 : 10 litre

volume
l
10 litre
li

H1 : 10 litre

KNF2053
Numerical Methods and Statistics

10 litre

Identify significance level,


0.01
Find the critical region, by referring to tacceptance region
distribution Table
t 2.8

t 2.8

region
rejection
j
g
t 2.8
2.8

Compute test statistic value by using


X 10.06 10
t

0.77
/ n 0.245 / 10

X
t
/ n

KNF2053
Numerical Methods and Statistics

Compare the test statistic value and critical


acceptance
t
i
region
region.
region
0.77 are in acceptance
region

Decision?

t 2.8

rejection region
t 2.8
0.7

2.8

Accept H0 and reject H1

KNF2053
Numerical Methods and Statistics

Two way hypothesis testing


Test the hypothesis
yp
that the average
g content
of containers of a particular lubricant is equal
to 10 liters if the contents of a random
sample of 10 containers are 10.2, 9.7, 10.1,
10.3, 10.1, 9.8, 9.9, 10.4, 10.3 and 9.8 liters.
Use a 0
01 level of significance and assume
0.01
that the distribution of contents is normal.
KNF2053
Numerical Methods and Statistics

List all information


10 litre
0.01

Find mean and standard for the sample


deviation
X 10.06

n 10

and 0.245

State the null hypothesis and alternative


volume 10litre
hypothesis
(reject )
H 0 : 10 litre

H1 : 10 litre
lit

volume 10 litre
(reject )

10 litre
(only accept this!)

KNF2053
Numerical Methods and Statistics

Identify significance level,


0.01
Find the critical region, by referring to tacceptance region
distribution Table
2.8 t 2.8

t 2.8 and t -2.8

rejection
j
region
g

rejection region

t -2.8

t 2.8

2.8

2.8

Compute test statistic value by using


X 10.06 10
t

0.77
/ n 0.245 / 10

X
t
/ n

KNF2053
Numerical Methods and Statistics

Compare the test statistic value and critical


region.
region
0.77 are in acceptance
region

acceptance region
2.8 t 2.8

Decision?
Accept H0 and reject H1

rejection
j
region
g
t -2.8

rejection region
t 2.8

2.8 0.77 2.8

KNF2053
Numerical Methods and Statistics

One-Tailed Test

Two tailed Test

HH0 0: :pp0 0

H 0 : p p0

HH1 1: :pp0 (0or


:p p )
( HH
1 :1 0 )0

H 1 : p p0

Test statistic:

p p0
z
p0 (1 p0 )
n
Critical region:
z > z (or
(
z < z )

Test statistic:

p p0
z
p0 (1 p0 )
n
Critical region:
| | > z/2
|z|
KNF2053
Numerical Methods and Statistics

p : sample proportion

Testing hypothesis for proportion


A manufacturer of a traditional medicine
claimed that his medicine is 90% effectve in
relieving backache for a period of 8 hrs. In a
sample of 200 people who had bachache, the
medicine
di i
provided
id d relief
li f for
f
160 people.
l
Determine whether the manufacturers claim
is legitimate at 1% significance level
level.

KNF2053
Numerical Methods and Statistics

One-Tailed Test
H0 : 2 0

Two tailed Test


H0 : 2 0

H1 : 2 0 (or H1 : 2 0 )
2

H1 : 2 0

Test statistic:

(n 1) s

Test statistic:

Critical region:
2>2 (or
( 2< 2 )

(n 1) s 2

Critical region:
| 2 | > 2 /2
2

s : sample variance

KNF2053
Numerical Methods and Statistics

Testing hypothesis for variance


In the past, the standard deviation of weights
of 1 litre of mineral water filled by
y a machine
was 0.01ml. A random sample of 20 bottles
showed a standard deviation of 0.02 ml. Is
the
h apparent increase
i
i variability
in
i bili significant
i ifi
at the 1% level of significance?

KNF2053
Numerical Methods and Statistics

Das könnte Ihnen auch gefallen