10/23/2023
Biostatistics
By
Dr. Waleed M. AL-Talabi
Yemeni Jordanian University
Biomedical Engineering 5th Level
2023
Study Design and
Sampling Methods
1
10/23/2023
Agenda
• Introduction
• Hypothesis Testing Steps
• Samples Type
• Samples Size
10/22/2023 3
Introduction
A hypothesis may be defined simply as a
statement about one or more populations.
The purpose of hypothesis testing is to aid the
clinician, researcher, or administrator in reaching a
conclusion concerning a population by examining
a sample from that population.
10/22/2023 4
2
10/23/2023
Introduction
Types of Hypothesis
Research Hypotheses Statistical Hypotheses
Lead directly to statistical hypotheses.
The conjecture or supposition that Hypotheses that are stated in such
motivates the research. a way that they may be evaluated
It may be the result of years of by appropriate statistical techniques.
observation on the part of the
researcher.
10/22/2023 5
Hypothesis Testing Steps
Hypothesis testing will be presented as a ten-step
procedure.
• This particular format merely breaks the process down
into a logical sequence of actions and decisions.
10/22/2023 6
3
10/23/2023
Hypothesis Testing Steps
10/22/2023 7
Hypothesis Testing Steps
10/22/2023 8
4
10/23/2023
Hypothesis Testing Steps
1. Data
The nature of the data that form the basis of the testing
procedures must be understood since this determines
the particular test to be employed.
• Whether the data consists of counts or measurements,
for example, must be determined.
10/22/2023 9
Hypothesis Testing Steps
2. Assumptions
Different assumptions lead to modifications of
confidence intervals.
• The same is true in hypothesis testing: A general
procedure is modified depending on the assumptions.
• These include assumptions about the normality of the
population distribution, equality of variances, and
independence of samples.
10/22/2023 10
5
10/23/2023
Hypothesis Testing Steps
3. Hypotheses
There are two statistical hypotheses involved in
hypothesis testing:
The null hypothesis (Ho)
The alternative hypothesis (HA)
10/22/2023 11
Hypothesis Testing Steps
• The null hypothesis is the hypothesis to be tested.
• In the testing process, the null hypothesis either is
rejected or is not rejected.
• If the null hypothesis is not rejected, we will say that the
data on which the test is based do not provide sufficient
evidence to cause rejection.
• If the testing procedure leads to rejection, we will say
that the data at hand are not compatible with the null
hypothesis, but are supportive of some other hypothesis.
10/22/2023 12
6
10/23/2023
Hypothesis Testing Steps
• The alternative hypothesis is a statement of what we
believe is true if our sample data causes us to reject the
null hypothesis.
• Usually, the alternative hypothesis and the research
hypothesis are the same, and in fact, the two terms are
used interchangeably.
10/22/2023 13
Hypothesis Testing Steps
We may state the following rules of thumb for deciding what
statement goes in the null hypothesis and what statement
goes in the alternative hypothesis:
What you hope or expect to be able to conclude as a
result of the test usually should be placed in the
alternative hypothesis.
The null hypothesis should contain a statement of
equality, either =, ≤, 𝒐𝒓 ≥.
The null hypothesis is the hypothesis that is tested.
10/22/2023 14
7
10/23/2023
Hypothesis Testing Steps
We may state the following rules of thumb for deciding what
statement goes in the null hypothesis and what statement
goes in the alternative hypothesis:
The null and alternative hypotheses are
complementary.
10/22/2023 15
Hypothesis Testing Steps
Suppose, for example, that we want to answer the
question:
Can we conclude that a certain population mean is
not 50?
The null hypothesis is:
𝑯𝟎 : 𝝁 = 𝟓𝟎
The alternative hypothesis is:
𝑯𝑨 : 𝝁 ≠ 𝟓𝟎
10/22/2023 16
8
10/23/2023
Hypothesis Testing Steps
Suppose, for example, that we want to answer the
question:
Can we conclude that a certain population mean is
greater than 50?
The null hypothesis is:
𝑯𝟎 : 𝝁 ≤ 𝟓𝟎
The alternative hypothesis is:
𝑯𝑨 : 𝝁 > 𝟓𝟎
10/22/2023 17
Hypothesis Testing Steps
Suppose, for example, that we want to answer the
question:
Can we conclude that a certain population mean is
less than 50?
The null hypothesis is:
𝑯𝟎 : 𝝁 ≥ 𝟓𝟎
The alternative hypothesis is:
𝑯𝑨 : 𝝁 < 𝟓𝟎
10/22/2023 18
9
10/23/2023
Hypothesis Testing Steps
4. Test statistic
• The test statistic is some statistic that may be computed
from the data of the sample.
• As we will see, the test statistic serves as a decision
maker, since the decision to reject or not to reject the null
hypothesis depends on the magnitude of the test
statistic.
10/22/2023 19
Hypothesis Testing Steps
4. Test statistic
An example of a test statistic is the quantity (standard
normal distribution):
𝒙 − 𝝁𝟎
𝒛=
𝝈/ 𝒏
where 𝜇 is a hypothesized value of a population mean.
𝒙 : variable value, 𝝈 : standard deviation, 𝒏 : samples number
10/22/2023 20
10
10/23/2023
Hypothesis Testing Steps
5. Distribution of test statistic
• The key to statistical inference is the sampling
distribution.
• The distribution of the test statistic:
𝒙 − 𝝁𝟎
𝒛=
𝝈/ 𝒏
• For example, follows the standard normal distribution if
the null hypothesis is true and the assumptions are met.
10/22/2023 21
Biostatistics
11
10/23/2023
Hypothesis Testing Steps
6. Decision rule
• All possible values that the test statistic can assume are
points on the horizontal axis of the graph of the
distribution of the test statistic and are divided into two
groups; one group constitutes what is known as the
rejection region and the other group makes up the
nonrejection region.
10/22/2023 23
Hypothesis Testing Steps
6. Decision rule
• The values of the test statistic forming the rejection
region are those values that are less likely to occur if
the null hypothesis is true, while the values making up
the acceptance region are more likely to occur if the
null hypothesis is true.
10/22/2023 24
12
10/23/2023
Hypothesis Testing Steps
6. Decision rule
• The decision rule tells us to reject the null hypothesis if
the value of the test statistic that we compute from our
sample is one of the values in the rejection region and
to not reject the null hypothesis if the computed value of
the test statistic is one of the values in the nonrejection
region.
10/22/2023 25
Hypothesis Testing Steps
6. Decision rule
Significance Level
• The decision as to which values go into the rejection
region and which ones go into the nonrejection region is
made on the basis of the desired level of significance,
designated by 𝜶.
10/22/2023 26
13
10/23/2023
Hypothesis Testing Steps
• The level of significance 𝜶 is a probability and, in fact, is
the probability of rejecting a true null hypothesis.
• Since to reject a true null hypothesis would constitute an
error, it seems only reasonable that we should make the
probability of rejecting a true null hypothesis small.
• We select a small value of 𝜶 in order to make the
probability of rejecting a true null hypothesis small.
• The more frequently encountered values of 𝜶 are 0.01,
0.05, and 0.10.
10/22/2023 27
Hypothesis Testing Steps
Types of Errors
• The error committed when a true null hypothesis is
rejected is called the type I error.
• The type II error is the error committed when a false null
hypothesis is not rejected.
• The probability of committing a type II error is
designated by 𝜷.
• We make 𝜶 small, but we generally exercise no control
over 𝜷 , although we know that in most practical
situations it is larger than 𝜶.
10/22/2023 28
14
10/23/2023
Hypothesis Testing Steps
Types of Errors
• If the testing procedure leads to rejection of the null
hypothesis, we can take comfort from the fact that we
made a small and, therefore, the probability of
committing a type I error was small.
• If we fail to reject the null hypothesis, we do not know the
concurrent risk of committing a type II error, since 𝜷 is
usually unknown but, as has been pointed out, we do
know that, in most practical situations, it is larger than 𝜶.
10/22/2023 29
Hypothesis Testing Steps
Types of Errors
• The various conditions of a hypothesis test, the possible
actions that an investigator may take, and the conditions
under which each of the two types of error will be made,
are all called a confusion matrix.
10/22/2023 30
15
10/23/2023
Hypothesis Testing Steps
The table shows a confusion matrix.
Conditions under which type I and type II errors may be committed
10/22/2023 31
Hypothesis Testing Steps
7. Calculation of test statistic
From the data contained in the sample, we
compute a value of the test statistic and
compare it with the rejection and nonrejection
regions that have already been specified.
10/22/2023 32
16
10/23/2023
Hypothesis Testing Steps
8. Statistical decision
The statistical decision consists of rejecting or
not rejecting the null hypothesis.
• It is rejected if the computed value of the test statistic
falls in the rejection region, and it is not rejected if the
computed value of the test statistic falls in the
nonrejection region.
10/22/2023 33
Hypothesis Testing Steps
9. Conclusion
If 𝐻 is rejected, we conclude that 𝐻 is true.
If 𝐻 is not rejected, we conclude that 𝐻 may
be true.
10/22/2023 34
17
10/23/2023
Hypothesis Testing Steps
10. p values
• The p-value is a number that tells us how unusual our
sample results are, given that the null hypothesis is true.
• A p-value indicating that the sample results are not likely
to have occurred if the null hypothesis is true, provides
justification for doubting the truth of the null hypothesis.
• “A p-value is the probability that the computed value of a
test statistic is at least as extreme as a specified value of
the test statistic when the null hypothesis is true.
• Thus, the p-value is the smallest value of 𝜶 for which we
can reject a null hypothesis.”
10/22/2023 35
Hypothesis Testing Steps
NOTE:
• We emphasize that when the null hypothesis is not
rejected one should not say that the null hypothesis is
accepted.
• We should say that the null hypothesis is “not rejected.”
• We avoid using the word “accept” in this case because
we may have committed a type II error.
• Since, frequently, the probability of committing a type II
error can be quite high, we do not wish to commit
ourselves to accepting the null hypothesis.
10/22/2023 36
18
10/23/2023
Hypothesis Testing Steps
Finally,
The purpose of hypothesis testing is to assist
administrators and clinicians in making decisions.
The administrative or clinical decision usually depends
on the statistical decision.
If the null hypothesis is rejected, the administrative or
clinical decision usually reflects this, in that the decision
is compatible with the alternative hypothesis.
The reverse is usually true if the null hypothesis is not
rejected.
10/22/2023 37
Hypothesis Testing Steps
Finally,
The administrative or clinical decision, however, may
take other forms, such as a decision to gather more
data.
It should be noted that hypothesis tests are relatively
sensitive to the size of the samples being tested, and
caution should be taken when interpreting results
involving very small sample sizes.
The statistical decision should not be interpreted as
definitive but should be considered along with all the
other relevant information available to the experimenter.
10/22/2023 38
19
10/23/2023
Biostatistics
Hypothesis
Case 1:
10/22/2023 40
20
10/23/2023
Hypothesis
Case 2:
10/22/2023 41
Hypothesis
Case 3:
10/22/2023 42
21
10/23/2023
Level of Significance
• The sample is said to be large if the size n ≥ 30.
• The sampling distribution corresponding to large
samples is approximated to normal distribution.
• The decision rule can be formulated based on the
following tabular value of Z-statistic with the level of
significance 𝜶.
10/22/2023 Back 43
Selection of Appropriate Test–Statistic
• Almost all the tests are based on normal distribution
theory.
• To study the difference between two population
variances, one can make use of the F-test or Z-test.
• To study the difference between three or more
population means, one can make use of an analysis of
variance test [ANOVA].
• For the goodness of fit, independence of attributes, and
test for specified population variance, one can make use
of the chi-square test [non-parametric test].
10/22/2023 44
22
10/23/2023
Selection of Appropriate Test–Statistic
10/22/2023 Back 45
Selection of Appropriate Test–Statistic
10/22/2023 46
23
10/23/2023
Selection of Appropriate Test–Statistic
Example:
• The NCHS report indicated that in 2002, Americans paid
an average of $3302 per year on health care and
prescription drugs.
• An investigator hypothesizes that in 2005, expenditures
were lower primarily due to the availability of generic
drugs.
• To test the hypothesis, a sample of 100 Americans is
selected and their expenditures on health care and
prescription drugs in 2005 are measured.
10/22/2023 47
Selection of Appropriate Test–Statistic
Example:
• The sample data are summarized as follows:
n = 100,
𝑋= $3190, and s = $890.
• Is there statistical evidence of a reduction in expenditures
on health care and prescription drugs in 2005?
• Is the sample mean of $3190 evidence of a true reduction
in the mean or is it within chance fluctuation?
10/22/2023 48
24
10/23/2023
Selection of Appropriate Test–Statistic
Answer:
Step 1: Set up hypotheses and determine the level
of significance.
• The research hypothesis is that expenditures have
decreased, and therefore a left-tailed test is used.
10/22/2023 49
Selection of Appropriate Test–Statistic
Answer:
Step 2: Select the appropriate test statistic.
• Because the sample size is large (n > 30), the appropriate
test statistic is: (Check Slide 45)
10/22/2023 50
25
10/23/2023
Selection of Appropriate Test–Statistic
Answer:
Step 3: Set up the decision rule.
• This is a lower-tailed test, using a z statistic and a 5%
level of significance.
• The appropriate critical value can be found in Slide 43 and
the decision rule is:
10/22/2023 51
Selection of Appropriate Test–Statistic
Answer:
Step 4: Compute the test statistic.
• We now substitute the sample data into the formula for the
test statistic identified in Step 2:
10/22/2023 52
26
10/23/2023
Selection of Appropriate Test–Statistic
Answer:
Step 5: Conclusion.
• We do not reject 𝐻 because -1.26 >-1.645.
• We do not have statistically significant evidence at 𝜶 = 𝟎. 𝟎𝟓
to show that the mean expenditures on health care and
prescription drugs are lower in 2005 than the mean of $3302
reported in 2002.
10/22/2023 53
Selection of Appropriate Test–Statistic
Answer:
Step 5: Conclusion.
• Recall that when we fail to reject 𝐻 in a test of the
hypothesis that either the null hypothesis is true (the
mean expenditures in 2005 are the same as those in
2002 and equal to $3302) or we are committing a Type II
error (we fail to reject 𝐻 when in fact it is false).
10/22/2023 54
27
10/23/2023
Selection of Appropriate Test–Statistic
Answer:
Step 5: Conclusion.
• In summarizing this test, we conclude that we do not have
sufficient evidence to reject 𝐻 .
• We do not conclude that 𝐻 is true because there may be
a moderate to high probability that we are committing a
Type II error.
• It is possible that the sample size is not large enough to
detect a difference in mean expenditures.
10/22/2023 55
Hypothesis Testing Flowchart
10/22/2023 56
28
10/23/2023
Biostatistics
Thank You
Questions
Biostatistics
29