Hypothesis Testing
Dr. D. Heena Cowsar
Assistant Professor of Commerce
Bon Secours College for Women
Thanjavur
heena.raffi@gmail.com
What is a hypothesis test?
• A hypothesis test is rule that specifies whether to
accept or reject a claim about a population
depending on the evidence provided by a sample of
data.
• A hypothesis test examines two opposing hypotheses
about a population: the null hypothesis and the
alternative hypothesis. The null hypothesis is the
statement being tested. Usually the null hypothesis is
a statement of "no effect" or "no difference". The
alternative hypothesis is the statement you want to
be able to conclude is true based on evidence
provided by the sample data.
• Based on the sample data, the test determines whether
to reject the null hypothesis. You use a p-value, to
make the determination. If the p-value is less than the
significance level (denoted as α or alpha), then you
can reject the null hypothesis.
• A common misconception is that statistical hypothesis
tests are designed to select the more likely of two
hypotheses. However, in designing a hypothesis test,
we set the null hypothesis as what we want to
disapprove. Because we fix the significance level to be
small before the analysis (usually, a value of 0.05
works well), when we reject the null hypothesis, we
have statistical proof that the alternative is true.
Conversely, if we fail to reject the null hypothesis we
do not have statistical proof that the null hypothesis is
true. This is because we have not fixed the probability
that we falsely accepting the null hypothesis to be
small.
null and alternative hypotheses
• The null and alternative hypotheses are two mutually
exclusive statements about a population. A hypothesis
test uses sample data to determine whether to reject the
null hypothesis.
• Null hypothesis (H0)The null hypothesis states that a
population parameter (such as the mean, the standard
deviation, and so on) is equal to a hypothesized value.
The null hypothesis is often an initial claim that is based
on previous analyses or specialized knowledge.
Alternative Hypothesis (H1)The alternative hypothesis
states that a population parameter is smaller, greater, or
different than the hypothesized value in the null
hypothesis. The alternative hypothesis is what you might
believe to be true or hope to prove true.
Five Steps in Hypothesis Testing:
• Specify the Null Hypothesis
• Specify the Alternative Hypothesis
• Set the Significance Level (a)
• Calculate the Test Statistic and
Corresponding P-Value
• Drawing a Conclusion
Step 1: Specify the Null
Hypothesis
• The null hypothesis (H0) is a statement of no
effect, relationship, or difference between two
or more groups or factors. In research studies,
a researcher is usually interested in disproving
the null hypothesis.
• The intervention and control groups have the
same survival rate (or, the intervention does
not improve survival rate).
• There is no association between injury type
and whether or not the patient received an IV
in the prehospital setting.
Step 2: Specify the Alternative Hypothesis
• The alternative hypothesis (H1) is the statement that there is
an effect or difference. This is usually the hypothesis the
researcher is interested in proving. The alternative
hypothesis can be one-sided (only provides one direction,
e.g., lower) or two-sided. We often use two-sided tests even
when our true hypothesis is one-sided because it requires
more evidence against the null hypothesis to accept the
alternative hypothesis.
Examples:
• The intubation success rate differs with the age of the
patient being treated (two-sided).
• The time to resuscitation from cardiac arrest is lower for the
intervention group than for the control (one-sided).
• There is an association between injury type and whether or
not the patient received an IV in the prehospital setting (two
Step 3: Set the Significance Level (a)
• The significance level (denoted by the Greek
letter alpha— a) is generally set at
0.05. This means that there is a 5% chance
that you will accept your alternative
hypothesis when your null hypothesis is
actually true. The smaller the significance
level, the greater the burden of proof needed
to reject the null hypothesis, or in other
words, to support the alternative
hypothesis.
Step 4: Calculate the Test Statistic and
Corresponding P-Value
• In another section we present some basic test
statistics to evaluate a hypothesis. Hypothesis testing
generally uses a test statistic that compares groups
or examines associations between variables. When
describing a single sample without establishing
relationships between variables, a confidence
interval is commonly used.
• The p-value describes the probability of obtaining a
sample statistic as or more extreme by chance alone
if your null hypothesis is true. This p-value is
determined based on the result of your test
statistic. Your conclusions about the hypothesis are
based on your p-value and your significance level.
Step 5: Drawing a Conclusion
• P-value <= significance level (a) => Reject
your null hypothesis in favor of your
alternative hypothesis. Your result is
statistically significant.
• P-value > significance level (a) => Fail to
reject your null hypothesis. Your result is
not statistically significant.
What are type I and type II errors?
• No hypothesis test is 100% certain. Because the
test is based on probabilities, there is always a
chance of making an incorrect conclusion.
When you do a hypothesis test, two types of
errors are possible: type I and type II. The
risks of these two errors are inversely related
and determined by the level of significance and
the power for the test. Therefore, you should
determine which error has more severe
consequences for your situation before you
define their risks.
Type I error
• When the null hypothesis is true and you reject
it, you make a type I error. The probability of
making a type I error is α, which is the level of
significance you set for your hypothesis test. An
α of 0.05 indicates that you are willing to
accept a 5% chance that you are wrong when
you reject the null hypothesis. To lower this
risk, you must use a lower value for α.
However, using a lower value for alpha means
that you will be less likely to detect a true
difference if one really exists.
Type II error
• When the null hypothesis is false and you
fail to reject it, you make a type II error.
The probability of making a type II error is
β, which depends on the power of the test.
You can decrease your risk of committing a
type II error by ensuring your test has
enough power. You can do this by ensuring
your sample size is large enough to detect a
practical difference when one truly exists.
The probability of making a type I error is represented by your
alpha level (α), which is the p-value below which you reject the
null hypothesis. A p-value of 0.05 indicates that you are willing to
accept a 5% chance that you are wrong when you reject the null
hypothesis.
You can reduce your risk of committing a type I error by using a
lower value for p. For example, a p-value of 0.01 would mean there
is a 1% chance of committing a Type I error.
The probability of making a type II
error
• The probability of making a type II error is
called Beta (β), and this is related to the
power of the statistical test (power = 1- β).
You can decrease your risk of committing a
type II error by ensuring your test has
enough power.
• You can do this by ensuring your sample
size is large enough to detect a practical
difference when one truly exists.

Hypothesis Testing.pptx

  • 1.
    Hypothesis Testing Dr. D.Heena Cowsar Assistant Professor of Commerce Bon Secours College for Women Thanjavur heena.raffi@gmail.com
  • 2.
    What is ahypothesis test? • A hypothesis test is rule that specifies whether to accept or reject a claim about a population depending on the evidence provided by a sample of data. • A hypothesis test examines two opposing hypotheses about a population: the null hypothesis and the alternative hypothesis. The null hypothesis is the statement being tested. Usually the null hypothesis is a statement of "no effect" or "no difference". The alternative hypothesis is the statement you want to be able to conclude is true based on evidence provided by the sample data.
  • 3.
    • Based onthe sample data, the test determines whether to reject the null hypothesis. You use a p-value, to make the determination. If the p-value is less than the significance level (denoted as α or alpha), then you can reject the null hypothesis. • A common misconception is that statistical hypothesis tests are designed to select the more likely of two hypotheses. However, in designing a hypothesis test, we set the null hypothesis as what we want to disapprove. Because we fix the significance level to be small before the analysis (usually, a value of 0.05 works well), when we reject the null hypothesis, we have statistical proof that the alternative is true. Conversely, if we fail to reject the null hypothesis we do not have statistical proof that the null hypothesis is true. This is because we have not fixed the probability that we falsely accepting the null hypothesis to be small.
  • 4.
    null and alternativehypotheses • The null and alternative hypotheses are two mutually exclusive statements about a population. A hypothesis test uses sample data to determine whether to reject the null hypothesis. • Null hypothesis (H0)The null hypothesis states that a population parameter (such as the mean, the standard deviation, and so on) is equal to a hypothesized value. The null hypothesis is often an initial claim that is based on previous analyses or specialized knowledge. Alternative Hypothesis (H1)The alternative hypothesis states that a population parameter is smaller, greater, or different than the hypothesized value in the null hypothesis. The alternative hypothesis is what you might believe to be true or hope to prove true.
  • 5.
    Five Steps inHypothesis Testing: • Specify the Null Hypothesis • Specify the Alternative Hypothesis • Set the Significance Level (a) • Calculate the Test Statistic and Corresponding P-Value • Drawing a Conclusion
  • 6.
    Step 1: Specifythe Null Hypothesis • The null hypothesis (H0) is a statement of no effect, relationship, or difference between two or more groups or factors. In research studies, a researcher is usually interested in disproving the null hypothesis. • The intervention and control groups have the same survival rate (or, the intervention does not improve survival rate). • There is no association between injury type and whether or not the patient received an IV in the prehospital setting.
  • 7.
    Step 2: Specifythe Alternative Hypothesis • The alternative hypothesis (H1) is the statement that there is an effect or difference. This is usually the hypothesis the researcher is interested in proving. The alternative hypothesis can be one-sided (only provides one direction, e.g., lower) or two-sided. We often use two-sided tests even when our true hypothesis is one-sided because it requires more evidence against the null hypothesis to accept the alternative hypothesis. Examples: • The intubation success rate differs with the age of the patient being treated (two-sided). • The time to resuscitation from cardiac arrest is lower for the intervention group than for the control (one-sided). • There is an association between injury type and whether or not the patient received an IV in the prehospital setting (two
  • 8.
    Step 3: Setthe Significance Level (a) • The significance level (denoted by the Greek letter alpha— a) is generally set at 0.05. This means that there is a 5% chance that you will accept your alternative hypothesis when your null hypothesis is actually true. The smaller the significance level, the greater the burden of proof needed to reject the null hypothesis, or in other words, to support the alternative hypothesis.
  • 9.
    Step 4: Calculatethe Test Statistic and Corresponding P-Value • In another section we present some basic test statistics to evaluate a hypothesis. Hypothesis testing generally uses a test statistic that compares groups or examines associations between variables. When describing a single sample without establishing relationships between variables, a confidence interval is commonly used. • The p-value describes the probability of obtaining a sample statistic as or more extreme by chance alone if your null hypothesis is true. This p-value is determined based on the result of your test statistic. Your conclusions about the hypothesis are based on your p-value and your significance level.
  • 10.
    Step 5: Drawinga Conclusion • P-value <= significance level (a) => Reject your null hypothesis in favor of your alternative hypothesis. Your result is statistically significant. • P-value > significance level (a) => Fail to reject your null hypothesis. Your result is not statistically significant.
  • 11.
    What are typeI and type II errors? • No hypothesis test is 100% certain. Because the test is based on probabilities, there is always a chance of making an incorrect conclusion. When you do a hypothesis test, two types of errors are possible: type I and type II. The risks of these two errors are inversely related and determined by the level of significance and the power for the test. Therefore, you should determine which error has more severe consequences for your situation before you define their risks.
  • 12.
    Type I error •When the null hypothesis is true and you reject it, you make a type I error. The probability of making a type I error is α, which is the level of significance you set for your hypothesis test. An α of 0.05 indicates that you are willing to accept a 5% chance that you are wrong when you reject the null hypothesis. To lower this risk, you must use a lower value for α. However, using a lower value for alpha means that you will be less likely to detect a true difference if one really exists.
  • 13.
    Type II error •When the null hypothesis is false and you fail to reject it, you make a type II error. The probability of making a type II error is β, which depends on the power of the test. You can decrease your risk of committing a type II error by ensuring your test has enough power. You can do this by ensuring your sample size is large enough to detect a practical difference when one truly exists.
  • 14.
    The probability ofmaking a type I error is represented by your alpha level (α), which is the p-value below which you reject the null hypothesis. A p-value of 0.05 indicates that you are willing to accept a 5% chance that you are wrong when you reject the null hypothesis. You can reduce your risk of committing a type I error by using a lower value for p. For example, a p-value of 0.01 would mean there is a 1% chance of committing a Type I error.
  • 15.
    The probability ofmaking a type II error • The probability of making a type II error is called Beta (β), and this is related to the power of the statistical test (power = 1- β). You can decrease your risk of committing a type II error by ensuring your test has enough power. • You can do this by ensuring your sample size is large enough to detect a practical difference when one truly exists.