100% found this document useful (1 vote)
83 views

Hypothesis Testing

This document provides an overview of hypothesis testing. It defines key concepts like the null and alternative hypotheses, test statistics, critical regions, p-values, and type I and II errors. It also outlines the six-step process for conducting a hypothesis test, including stating hypotheses, choosing a test statistic, determining critical values, computing test statistics and p-values, and making conclusions. Examples are provided to illustrate these concepts.

Uploaded by

Robi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
83 views

Hypothesis Testing

This document provides an overview of hypothesis testing. It defines key concepts like the null and alternative hypotheses, test statistics, critical regions, p-values, and type I and II errors. It also outlines the six-step process for conducting a hypothesis test, including stating hypotheses, choosing a test statistic, determining critical values, computing test statistics and p-values, and making conclusions. Examples are provided to illustrate these concepts.

Uploaded by

Robi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

Basic of Hypothesis

Testing

Astri Mutiar, MS
Hypothesis
• To tell whether our data supports or rejects our ideas,
we use statistical hypothesis testing.

• The problem is that we often get data that seem to


support our ideas. The literature is full of papers that
accept a pet idea uncritically. Statistical testing keeps
scientists honest.

• If you read a paper that suggests some alternative


hypothesis should be accepted, but there is no statistical
test, don't believe it.
Hypothesis
• Hypothesis provide a way for researcher to
articulate the expected relationship between
variables.

• The expected relationship can be either an


association (no causal effect presumed) or a
causal relationship (in which the independent
variable is said to cause changes in the
dependent variable).
Hypothesis Testing
• Is also called significance testing
• Tests a claim about a parameter using
evidence (data in a sample
• The technique is introduced by considering
a one-sample z test
• The procedure is broken into four steps
• Each element of the procedure must be
understood
Six-Step Process for Testing
Hypothesis

1. State the hypothesis


2. Define the significance level for the
study, choose the appropriate test
statistic, determine the critical region,
and state the rejection rule.
3. Make sure that the data meet the
necessary assumption to compute the
test statistics
Six-Step Process for Testing
Hypothesis

4. Compute the parameters that are being


compared by the test statistic
5. Compute the test statistic and obtain
the p-value of the computed statistic
6. Determine whether the result is
statistically significant and clearly state a
conclusion.
Null and Alternative Hypotheses
• There are two types of hypotheses: null and alternative
hypothesis.
• The null hypothesis (H0) is a claim of “no difference
or relationship in the between variables of interest”
• The alternative hypothesis (Ha) is also known as the
acting or research hypothesis, claims “H0 is false”
The alternative hypothesis is expressed in one of two
ways: directional or non-directional.
A directional hypothesis states that there will be a
relationship between two variables and gives the expected
direction of that relationship.
A non-directional hypothesis simply states that there will
be a statistically sig
Hypotheses
• For example, the first main hypothesis from the study of
“Is the Oral Health of Children Admitted to a PICU
Significantly Different from that of Children in the
General Population?” can be stated in three ways:
• Null Hypothesis (H0): The oral health of children in the
PICU will not differ from that of children in the general
population.
• Non-directional alternative hypothesis (HA): The
oral health of children in the PICU will be significantly
different from the oral health of children in the general
population.
• Directional alternative hypothesis (HA): The oral
health of children in the PICU will be significantly worse
than the oral health of children in the general population.
Critical Region, Critical Value,
Test Statistic
Test Statistic

The test statistic is a value used in making a


decision about the null hypothesis, and is
found by converting the sample statistic to a
score with the assumption that the null
hypothesis is true.
Critical Region

The critical region (or rejection region) is the set


of all values of the test statistic that cause us to
reject the null hypothesis. For example, see the
red-shaded region in the previous figure.
Significance Level

The significance level (denoted by α) is the


probability that the test statistic will fall in the
critical region when the null hypothesis is
actually true. Common choices for α are 0.05,
0.01, and 0.10.
Critical Value
A critical value is any value that separates the
critical region (where we reject the null
hypothesis) from the values of the test statistic
that do not lead to rejection of the null
hypothesis. The critical values depend on the
nature of the null hypothesis, the sampling
distribution that applies, and the significance level
α. See the previous figure where the critical value
of z = 1.645 corresponds to a significance level of
α = 0.05.
Two-tailed, Right-tailed,
Left-tailed Tests
The tails in a distribution are the extreme
regions bounded by critical values.
Two-tailed Test
H0: = α is divided equally between
the two tails of the critical
H1: ≠ region

Means less than or greater than


Right-tailed Test
H0: =
H1: >
Points Right
Left-tailed Test
H0: =
H1: <
Points Left
P-Value

The P-value (or p-value or probability value) is


the probability of getting a value of the test
statistic that is at least as extreme as the one
representing the sample data, assuming that the
null hypothesis is true. The null hypothesis is
rejected if the P-value is very small, such as 0.05
or less.
Conclusions
in Hypothesis Testing

We always test the null hypothesis.


The initial conclusion will always be
one of the following:

1. Reject the null hypothesis.

2. Fail to reject the null hypothesis.


Decision Criterion

Traditional method:

Reject H0 if the test statistic falls


within the critical region.

Fail to reject H0 if the test statistic


does not fall within the critical region.
Decision Criterion - cont

P-value method:

Reject H0 if the P-value ≤ α (where α


is the significance level, such as 0.05).

Fail to reject H0 if the P-value > α.


Decision Criterion - cont

Confidence Intervals:

Because a confidence interval estimate of a


population parameter contains the likely
values of that parameter, reject a claim that
the population parameter has a value that
is not included in the confidence interval.
Procedure for Finding P-Values
Figure 8-6
Wording of Final Conclusion
Accept Versus Fail to Reject

• Some texts use “accept the null


hypothesis.”

• We are not proving the null hypothesis.


• The sample evidence is not strong
enough to warrant rejection
(such as not enough evidence to
convict a suspect).
Type I Error

• A Type I error is the mistake of


rejecting the null hypothesis when it
is true.

• The symbol α (alpha) is used to


represent the probability of a type I
error.
Type II Error
• A Type II error is the mistake of failing
to reject the null hypothesis when it is
false.

• The symbol β (beta) is used to


represent the probability of a type II
error.
Type I and Type II Errors
Decision True False
Accept Ho OK Type II

Reject Ho Type I OK
Controlling Type I and
Type II Errors
• For any fixed α, an increase in the sample
size n will cause a decrease in β.

• For any fixed sample size n, a decrease in


α will cause an increase in β. Conversely,
an increase in α will cause a decrease in
β.

• To decrease both α and β, increase the


sample size.
Definition
The power of a hypothesis test is the
probability (1 - β ) of rejecting a false null
hypothesis, which is computed by using a
particular significance level α and a particular
value of the population parameter that is an
alternative to the value assumed true in the
null hypothesis. That is, the power of the
hypothesis test is the probability of supporting
an alternative hypothesis that is true.
Comprehensive
Hypothesis Test –
P-Value Method
Comprehensive
Hypothesis Test –
Traditional Method
Comprehensive
Hypothesis Test - cont
A confidence interval estimate of a population
parameter contains the likely values of that
parameter. We should therefore reject a claim that
the population parameter has a value that is not
included in the confidence interval.
Example:

• “Apakah wanita yang mengikuti arisan


mempunyai perbedaan BMI dengan
wanita di populasi umum di Bandung?”
Step 1: State the Null Hypothesis

• Ho : ……….
• Ha:
Step 2: Define the significance level for the study,
choose the appropriate test statistic, determine the
critical region, and state the rejection rule.

1. Significance level:
2. Statistic test:
3. Critical value:
Step 3:Make sure that the data meet the
necessary assumption to compute the test
statistics

The BMI data are normally distributed.

Sample: 48 women
The mean and population standard
deviation of BMI in was 27.9 . Standard
deviation of 5.4.
Step 4: Compute and state the parameters
that are being compared by the test statistic

• The mean BMI of the 48 women in the


sample was 29.2 with standard
deviation of 3.4
Step 5: Compute the test statistic
and obtain its p-value
x - µx 29.2 -27.9
z =
σ
z =
5.4
n 48

1.3 1.3
z = z = z = 1.67
5.4 0.7794
6.928
• Therefore, the computed value of the z-test is 1.67.
This value does not exceed the critical value of 1.96,
and so it does not fall into the rejection region.
• Convert z-score to p-value.
• After calculating the standardized score, we need to
look up the area (same as probability) using the z-
table. First, we find the first two digits on the left
side of the z-table. In this case it is 1.6. Then, we
look up a remaining number across the table (on the
top) which is 0.07 in our example. The corresponding
area is 0.9525 which translates into 95.25%.
Step 6: Determine statistical significance and
clearly state a conclusion

• Z-test < critical value


• P-value > 0.05
• Null hypothesis is accepted
Test Statistic - Formulas
z=p-p
/\

Test statistic for


pq proportions
√ n
x - µx Test statistic
z =
σ for mean
n

(n – 1)s2 Test statistic


χ2 = for standard
σ2 deviation
Normality
Population Sample
Sampling

Data description and 48


inferential statistics 48

2019/10/14
The Normal Distribution

f(X) Changing μ shifts the


distribution left or right.

Changing σ increases
or decreases the
σ spread.

µ X
Are my data “normal”?
Not all continuous random variables are
normally distributed!!
It is important to evaluate how well the
data are approximated by a normal
distribution
Are my data normally
distributed?
1. Look at the histogram! Does it appear bell
shaped?
2. Compute descriptive summary measures—
are mean, median, and mode similar?
3. Look at the value of skewness and kurtosis
4. Look at a normal probability plot—is it
approximately linear?
5. Run tests of normality (such as
Kolmogorov-Smirnov). But, be cautious,
highly influenced by sample size!
Histogram
Histogram
Skewness and kurtosis

Statistic skewness and kurtosis : standard error


Assumption: ± 3, data are normal
Q-Q plot distribution
One-Sample Kolmogorov-Smirnov Goodness-of-Fit Test

— The Kolmogorov-Smirnov Z test,also called the Kolmogorov-


Smirnov D test,is a goodness-of-fit test which tests whether a
given distribution is not significantly different from one
hypothesized (ex.,on the basis of the assumption of a normal
distribution).It is a more powerful alternative to chi-square
goodness-of-fit tests when its assumptions are met.Whereas
the chi-square test of goodness-of-fit tests whether in general
the observed distribution is not
significantly different from the hypothesized one,the K-S test
tests whether this is so even for the most deviant values of the
criterion variable.Thus it is a more stringent test.
One-Sample Kolmogorov-Smirnov Goodness-of-Fit Test
— As illustrated in the SPSS dialog for the Kolmogorov-Smirnov test,SPSS
supports the following hypothetical distributions: uniform,normal,Poisson,
and exponential.

20
K-S Goodness-of-Fit Test

The two-tailed significance of the test statistic is very small (.000),meaning it is


significant.A finding of significance, as here,means Educational Level may not be
assumed to come from a normal distribution with the given mean and standard
deviation.It might still be that sample subgroups (ex., females), with different means
and standard deviations, might test as being plausibly from a normal distribution, but
that is not tested here.
58
Then…. what should we do if our data
are not normal?
1. Re-check data
2. Re-consider outlier
3. Deleted outlier?
4. Do non-parametric test
Transform Data
1. Log10
2. Square root
3. Root

Change the real data

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