Hypothesis (Z Test)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

Hypothesis (Z Test)

Biomedical Statistics
Probability of Error ( Example I)
 Suppose that, in a hypothesis test, the null hypothesis is in
fact true.
a) Is it possible to make a Type I error? Explain your answer.
b) Is it possible to make a Type II error? Explain your
answer.
Answer
a) Possible, because Type I error is rejecting the null
hypothesis when it is in fact true.
b) Not possible, because type II error is not rejecting the null
hypothesis when it is in fact false (since we know it is
true).
Probability of Error ( Example II)
 Suppose that, in a hypothesis test, the null hypothesis
is in fact false.
a) Is it possible to make a Type I error? Explain your
answer.
b) Is it possible to make a Type II error? Explain your
answer.
Answer
 Not possible, because Type I error is rejecting the
null hypothesis when it is in fact true (which we
know is false).
 Possible, because type II error is not rejecting the
null hypothesis when it is in fact false.
Probability of Error ( Example III)
 Answer true or false and explain your answer: If it is
important not to reject a true null hypothesis, the hypothesis
test should be performed at a small significance level.
 True, because the significance level is equal to the
probability of making a type I error and thus the smaller the
significance level, the more unlikely it is to reject a true
null hypothesis.
Example IV
 Animals are hazardous to heavy metals like cadmium. On
the other hand, mushrooms have a great capacity to absorb
and accumulate cadmium. The safety level of 0.5 parts per
million (ppm) for cadmium in dry vegetables has been
determined by the governments of the Czech Republic and
Slovakia. In a randomised sample of the edible mushroom,
Prof. Peter analysed the amount of cadmium present. He
then published the results in the journal paper "Influence of
Some Factors in Toxicity of Cd." To determine if the mean
cadmium content of mushrooms exceeds the government-
recommended limit, a hypothesis test will be conducted.
……
 Describe the meaning of each of the following.
a) Type I error
b) Type II error
c) Correct decision
Let us now assume that the null hypothesis is not rejected based on
the outcomes of the hypothesis test. If the mean cadmium level in
mushrooms actually
d) equals the safety limit of 0.5 ppm or
e) exceeds the safety limit of 0.5 ppm, then categorise that
conclusion as a correct judgment or by error type.
Solution
 The population mean is equal to the specified value:
𝐻0:𝜇 = 0.5𝑝𝑝𝑚
 The population mean is more than the specified value:
𝐻𝑎:𝜇 > 0.5𝑝𝑝𝑚
a) Type I error: reject 𝐻0 when 𝐻0 is true
 We conclude that the mean cadmium level in mushrooms is
greater than 0.5 ppm, which is incorrect.
b) Type II error: not reject 𝐻0 when 𝐻0 is false
 We conclude that the mean cadmium level in mushrooms is
equal to 0.5 ppm, while it is actually greater than 0.5 ppm.
……
c) Accept 𝐻0​ when 𝐻0​ is true and reject 𝐻0 when 𝐻0 is false.
 We decide that the mean cadmium level in mushrooms is
greater than 0.5 ppm, when this is correct.
 We decide that the mean cadmium level in mushrooms is
equal to 0.5 ppm, when this is correct.
d) Correct decision, because 𝐻𝑎 is false and 𝐻0 is true, while
𝐻0 was not rejected.
e) Type II error, because 𝐻𝑎​ is true and 𝐻0 is false, while H0
was not rejected.
Critical Value Approach
Rejection Region, Nonrejection Region,
and Critical Values
 Rejection region: The set of values for the test statistic that
leads to rejection of the null hypothesis.
 Nonrejection region: The set of values for the test statistic
that leads to nonrejection of the null hypothesis.
 Critical value(s): The value or values of the test statistic
that separate the rejection and nonrejection regions. A
critical value is considered part of the rejection region.
Left Tailed, Right Tailed and Two
Tailed Tests
Critical Values (Example)
 Determine the critical value(s) for a one-mean z-test at
the 5% significance level (α =0.05) if the test is
a) two tailed.
b) left tailed.
c) right tailed.
Solution
 Because α =0.05, we need to choose the critical value(s) so
that the area under the standard normal curve that lies
above the rejection region equals 0.05.
a) For a two-tailed test, the rejection region is on both the
left and right. So the critical values are the two z-scores
that divide the area under the standard normal curve into a
middle 0.95 area and two outside areas of 0.025.
b) In other words, the critical values are ± Z0.025. From Table,
±Z0.025 = ± 1.96, as shown in Fig(next slide)
……

b) For a left-tailed test, the rejection region is on the left. So


the critical value is the z-score with area 0.05 to its left
under the standard normal curve, which is −Z0.05. From
Table,−Z0.05 = − 1.645, as shown in Fig.
c) For a right-tailed test, the rejection region is on the right.
So the critical value is the z-score with area 0.05 to its
right under the standard normal curve, which is Z0.05.
From Table, Z0.05 =1.645, as shown in Fig.
Steps in the Critical-Value Approach to
Hypothesis Testing
Example
 The following table lists the daily rates, expressed in US
dollars, for a selection of 15 South Carolina-based hotels
and motels. The South Dakota Budget and Control Board
sponsored the paper Statistical Abstract, which contained
the statistics.

81.05 69.63 74.25 53.39 57.48

47.87 61.07 51.4 50.37 106.43

47.72 58.07 56.21 130.17 95.23


……
a) To determine whether the data give enough evidence to
establish that the mean daily charge for hotels and motels
operating in South Dakota is less than $75, apply the one-
mean z-test at the 5% significance level. Let us assume a
$22.40 population standard deviation.
 n=Sample size=15
 Population standard deviation= σ = 22.40
 Significance level= α= 5%=0.05
 Given claim: Mean is less than 75
……
x̄ − μ0
 Z=
σ/√𝑛
69.356 − 75
 Z= 22.40
√15

 Z = - 0.98

 There is not sufficient evidence to support the claim


that the mean daily charge for hotels and motels
operating in South Dakota is less than $75.
b) Obtain boxplot, histogram, and stem-and-leaf diagram of
the data.
 47.72, 47.87, 50.37, 51.4, 53.39, 56.21, 57.48, 58.07,
61.07, 69.63, 74.25, 81.05, 95.23, 106.43, 130.17
 m=58.07
 Q1​=51.4
 Q3​=81.05
 IQR = Q3​−Q1​ = 81.05−51.4 = 29.65
 Q3​+1.5IQR = 81.05+1.5(29.65) = 125.525
 Q1​−1.5IQR​=51.4−1.5(29.65) = 6.925​
……
c) Remove the outliers (if any) from the data and then repeat
part (a).
 We concluded that 130.17 is an outlier. Let us remove this
data value from the data set.
 Given claim: Mean is less than 75

 Now mean is 65.0121.


 Now again calculating our test statistic value
x̄ − μ0
 Z=
σ/√𝑛
65.0121− 75
 Z= 22.40
√14

 Z = −1.67
 the null hypothesis is rejected.
 There is sufficient evidence to support
the claim that the mean daily charge
for hotels and motels operating in South
Carolina is less than $75.
Practice Question
 The average sentence for motor vehicle theft offenders in
Australia is 16.7 months, according to the Bureau of Crime
Statistics and Research of Australia. The average sentence
for one hundred randomly chosen motor vehicle theft
offenders in Sydney, Australia, was 17.8 months. Is there
enough evidence in the data, at the 5% significance level, to
draw the conclusion that the average sentence for motor
vehicle theft offenders in Sydney is different from the
average for all of Australia? Assume that Sydney's
population standard deviation for the period of jail time for
those who steal motor vehicles is 6.0 months.
Practice Question
 In a research titled "Heat Stress Evaluation and Worker
Fatigue in a Steel Plant," Mr Chen evaluated the effects of
heat stress on worker tiredness in steel plants. The mean
post-work heart rate of a random sample of 29 casting
workers was found to be 78.3 beats per minute (bpm). Do
the data show enough evidence, at the 5% significance
level, to draw the conclusion that casting workers' mean
postwork heart rates are higher than the average resting
heart rate of 72 bpm? Assume that 11.2 bpm is the
population standard deviation of casting workers' post-work
heart rates.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy