SlideShare a Scribd company logo
1 of 29
Download to read offline
HYPOTHESIS TESTING
IN STATISTICS
NOT EVERYTHING YOU’RE TOLD IS ABSOLUTELY CERTAIN
• The trouble is, how do you know when what you’re being told isn’t right? Hypothesis tests give
you a way of using samples to test whether or not statistical claims are likely to be true. They give
you a way of weighing the evidence and testing whether extreme results can be explained by
mere coincidence.
NEW SCENARIO
Statsville’s new miracle drug
• Statsville’s leading drug company has produced a new remedy for curing snoring. Frustrated snorers are
flocking to their doctors in hopes of finding nightly relief.
• The drug company claims that their miracle drug cures 90% of people within two weeks, which is great news
for the people with snoring difficulties. The trouble is, not everyone’s convinced
• The doctor at the Statsville Surgery has been prescribing SnoreCull to her patients, but she’s disappointed by
the results. She decides to conduct her own trial of the drug.
• She takes a random sample of 15 snorers and puts them on a course of SnoreCull for two weeks. After two
weeks, she calls them back in to see whether their snoring has stopped.
• Here are the results:
• If the drug cures 90% of people, how many people in the sample of 15 snorers would you expect to have
been cured? What sort of distribution do you think this follows?
• 90% of 15 is 13.5, so you’d expect 14 people to be cured. Only 11 people in the doctors sample were cured,
which is much lower than the result you’d expect
• There are a specific number of trials and the doctor is interested in the number of successes, so the
number of successes follows a binomial distribution. If X is the number of successes then X ~ B(15, 0.9).
SO WHAT’S THE PROBLEM?
• Here’s the probability distribution for how many people the drug company says should have been cured by the
snoring remedy.
• So why the discrepancy?
• The drug company might not be deliberately telling lies, but their claims might be misleading.
• It’s possible that the tests of the drug company were flawed, and this might have resulted in misleading claims
being made about SnoreCull. They may have inadvertent conducted flawed or biased tests on SnoreCull,
which resulted in them making inaccurate predictions about the population. If the success rate of SnoreCull is
actually lower than 90%, this would explain why only 11 people in the sample were cured.
The drug company’s claims might actually be accurate.
• Rather than the drug company being at fault, it’s always possible that the patients in the doctor’s sample may
not have been representative of the snoring population as a whole. It’s always possible that the snoring remedy
does cure 90% of snorers, but the doctor just happens to have a higher proportion of people in her sample
whom it doesn’t cure. In other words, her sample might be biased in some way, or it could just come down to
there being a small number of patients in the sample.
Resolving the conflict from 50,000 feet
• So how do we resolve the conflict between the doctor and the drug company? Let’s take a very high level view
of what we need to do. We can resolve the conflict between the drug company and the doctor byputting the
claims of the drug company on trial.
• In other words, we’ll accept the word of the drug company by default, but if there’s strong evidence against it,
we’ll side with the doctor instead.
HERE’S WHAT WE’LL DO:
• In general, this process is called hypothesis testing, as you take a hypothesis or claim and then test it against the
evidence. Let’s look at the general process for this.
THE SIX STEPS FOR HYPOTHESIS TESTING
• Here are the broad steps that are involved in hypothesis testing. We’ll go through each one in detail in the
following pages.
THE DRUG COMPANY’S CLAIM
• According to the drug company, SnoreCull cures 90% of patients within 2 weeks. We need to accept this
position unless there is sufficiently strong evidence to the contrary.
• The claim that we’re testing is called the null hypothesis. It’s represented by H0, and it’s the claim that we’ll
accept unless there is strong evidence against it.
SO WHAT’S THE NULL HYPOTHESIS FOR SNORECULL?
• The null hypothesis for SnoreCull is the claim of the drug company: that it cures 90% of patients. This is the
claim that we’re going to go along with, unless we find strong evidence against it.
• We need to test whether at least 90% of patients are cured by the drug, so this means that the null hypothesis is
that p = 90%.
So what’s the alternative?
• We’ve looked at what the claim is we’re going to test, the null hypothesis, but what if it’s not true? What’s the
alternative?
• The counterclaim to the null hypothesis is called the alternate hypothesis. It’s represented by H1, and it’s the
claim that we’ll accept if there’s strong enough evidence to reject H0.
• The doctor believes that SnoreCull cures less than 90% of people, so this means that the alternate hypothesis is
that p < 90%.
• When hypothesis testing, you assume the null hypothesis is true. If there’s sufficient evidence against it,
you reject it and accept the alternate hypothesis.
Step 2: Choose your test statistics
• Now that you’ve determined exactly what it is you’re going to test, you need some means of testing it. You can
do this with a test statistic. The test statistic is the statistic that you use to test your hypothesis. It’s the statistic
that’s most relevant to the test.
What’s the test statistic for SnoreCull?
• In our hypothesis test, we want to test whether SnoreCull cures 90% of people or more. To test this, we can
look at the probability distribution according to the drug company, and see whether the number of successes
in the sample is significant.
• If we use X to represent the number of people cured in the sample, this means that we can use X as our test
statistic. There are 15 people in the sample, and the probability of success according to the drug company is
0.9. As X follows a binomial distribution, this means that the test statistic is actually:
• We choose the test statistic according to H0, the null hypothesis.
• We need to test whether there is sufficient evidence against the null hypothesis, and we do this by first
assuming that H0 is true. We then look for evidence that contradicts H0. For the SnoreCull hypothesis test, we
assume that the probability of succes,s is 0.9 unless there is strong evidence against this being true.
• To do this, we look at how likely it is for us to get the results we did, assuming the probability of success is 0.9.
In other words, we take the results of the sample and examine the probability of getting that result.We do this
by finding a critical region.
STEP 3: DETERMINE THE CRITICAL REGION
• The critical region of a hypothesis test is the set of values that present the most extreme evidence against the
null hypothesis.
• Let’s see how this works by taking another look at the doctor’s sample. If 90% or more people had been
cured, this would have been in line with the claims made by the drug company. As the number of people
cured decreases, the more unlikely it becomes that the claims of the drug company are true.
• Here’s the probability distribution:
AT WHAT POINT CAN WE REJECT THE DRUG COMPANY CLAIMS?
• What we need is some way of indicating at what point we can reasonably reject the null hypothesis, and we can
do this by specifying a critical region. If the number of snorers cured falls within the critical region, then we’ll
say there is sufficient evidence to reject the null hypothesis. If the number of snorers cured falls outside the
critical region, then we’ll accept that there isn’t sufficient evidence to reject the null hypothesis, and we’ll accept
the claims of the drug company. We’ll call the cut off point for the critical region c, the critical value.
• So how do we choose the critical region?
TO FIND THE CRITICAL REGION, FIRST DECIDE ON THE SIGNIFICANCE LEVEL
• Before we can find the critical region of the hypothesis test, we first need to decide on the significance level.
The significance level of a test is a measure of how unlikely you want the results of the sample to be before you
reject the null hypothesis Ho. Just like the confidence level for a confidence interval, the significance level is
given as a percentage.
• As an example, suppose we want to test the claims of the drug company at a 5% level of significance. This
means that we choose the critical region so that the probability of fewer than c snorers being cured is less than
0.05. It’s the lowest 5% of the probability distribution.
• The significance level is normally represented by the Greek letter𝛼. The lower 𝛼 is, the more unlikely the
results in your sample need to be before we reject Ho.
So what significance level should we use?
• Let’s use a significance level of 5% in our hypothesis test. This means that if the number of snorers cured in
the sample in the lowest 5% of the probability distribution, then we will reject the claims of the drug company.
If the number of snorers cured lies in the top 95% of the probability distribution, then we’ll decide there isn’t
enough evidence to reject the null hypothesis, and accept the claims of the drug company. If we use X to
represent the number of snorers cured, then we define the critical region as being values such that
• When you’re constructing a critical region for your test, another thing you need to be aware of is whether
you’re conducting a one-tailed or two-tailed test. Let’s look at the difference between the two, and what impact
this has on the critical region?
• A one-tailed test is where the critical region falls at one end of the possible set of values in your test. You
choose the level of the test—represented by 𝛼—and then make sure that the critical region reflects this as a
corresponding probability.
• The tail can be at either end of the set of possible values, and the end you use depends on your alternate
hypothesis H1.
• If your alternate hypothesis includes a < sign, then use the lower tail, where the critical region is at the lower
end of the data.
• If your alternate hypothesis includes a > sign, then use the upper tail, where the critical region is at the upper
end of
• the data. We’re using a one-tailed test for the SnoreCull hypothesis test with the critical region in the lower tail,
as our alternate hypothesis is that p < 0.9.
TWO-TAILED TESTS
• A two-tailed test is where the critical region is split over both ends of the set of values. You choose the level of
the test  , and then make sure that the overall critical region reflects this as a corresponding probability by
splitting it into two. Both ends contain  /2, so that the total is  .
• You can tell if you need to use a two-tailed test by looking at the alternate hypothesis H1. If H1 contains a 
sign, then you need to use a two-tailed test as you are looking for some change in the parameter, rather than an
increase or decrease.
• We would have used a two-tailed test for our SnoreCull if our alternate hypothesis had been p  0.9. We
would have had to check whether significantly more or significantly fewer than 90% of patients had been cured
FIND THE P-VALUE
• Now that we’ve looked at critical regions, we can move on to step 4, finding the p-value.
• A p-value is the probability of getting a value up to and including the one in your sample in the direction of
your critical region. It’s a way of taking your sample and working out whether the result falls within the critical
region for your hypothesis test. In other words, we use the p-value to say whether or not we can reject the null
hypothesis.
How do we find the p-value?
• How we find the p-value depends on our critical region and our test statistic. For the SnoreCull test, 11 people
were cured, and our critical region is the lower tail of the distribution. This means that our p-value is P(X 11),
where X is the distribution for the number of people cured in the sample.
• As the significance level of our test is 5%, this means that if P(X 11) is less than 0.05, then the value 11 falls
within the critical region, and we can reject the null hypothesis.
• We know from step 2 that X ~ B(15, 0.9). What’s P(X ≤ 11)?
• A p-value is the probability of getting the results in the sample, or something more extreme, in the
direction of the critical region.
• In our hypothesis test for SnoreCull, the critical region is the lower tail of the probability distribution. In order
to see whether 11 people being cured of snoring is in the critical region, we calculated P(X 11), as this is the
probability of getting a result at least as extreme as the results of our sample in the direction of the lower tail.
• Had our critical region been the upper tail of the probability distribution instead, we would have needed to
find P(X 11). We would have counted more extreme results as being greater than 11, as these would have
been closer to the critical region.
STEP 5: IS THE SAMPLE RESULT IN THE CRITICAL REGION?
• Now that we’ve found the p-value, we can use it to see whether the result from our sample falls within the
critical region. If it does, then we’ll have sufficient evidence to reject the claims of the drug company
• Our critical region is the lower tail of the probability distribution, and we’re using a significance level of 5%.
This means that we can reject the null hypothesis if our p-value is less that 0.05. As our p-value is 0.0555, this
means that the number of people cured by SnoreCull in the sample doesn’t fall within the critical region.
STEP 6: MAKE YOUR DECISION
• We’ve now reached the final step of the hypothesis test. We can decide whether to accept the null hypothesis,
or reject it in favor of the alternative.
• The p-value of the hypothesis test falls just outside the critical region of the test. This means that there isn’t
sufficient evidence to reject the null ,In other words:
We accept the claims of the drug company hypothesis.

More Related Content

What's hot

Session 9 intro_of_topics_in_hypothesis_testing
Session 9 intro_of_topics_in_hypothesis_testingSession 9 intro_of_topics_in_hypothesis_testing
Session 9 intro_of_topics_in_hypothesis_testing
Glory Codilla
 
Hypothesis Testing Lesson 1
Hypothesis Testing Lesson 1Hypothesis Testing Lesson 1
Hypothesis Testing Lesson 1
yhchung
 

What's hot (20)

Lesson p values
Lesson   p valuesLesson   p values
Lesson p values
 
Session 9 intro_of_topics_in_hypothesis_testing
Session 9 intro_of_topics_in_hypothesis_testingSession 9 intro_of_topics_in_hypothesis_testing
Session 9 intro_of_topics_in_hypothesis_testing
 
Hypothesis testing and p values 06
Hypothesis testing and p values  06Hypothesis testing and p values  06
Hypothesis testing and p values 06
 
Hypothesis testing and p values 06
Hypothesis testing and p values  06Hypothesis testing and p values  06
Hypothesis testing and p values 06
 
Lecture6 Applied Econometrics and Economic Modeling
Lecture6 Applied Econometrics and Economic ModelingLecture6 Applied Econometrics and Economic Modeling
Lecture6 Applied Econometrics and Economic Modeling
 
Hypothesis testing, error and bias
Hypothesis testing, error and biasHypothesis testing, error and bias
Hypothesis testing, error and bias
 
Hypothesis Testing
Hypothesis TestingHypothesis Testing
Hypothesis Testing
 
Chapter8
Chapter8Chapter8
Chapter8
 
If you liked it you should've put a p-value on it ...or not
If you liked it you should've put a p-value on it ...or notIf you liked it you should've put a p-value on it ...or not
If you liked it you should've put a p-value on it ...or not
 
Chapter 4 est. test of hypothesis
Chapter 4 est. test of hypothesisChapter 4 est. test of hypothesis
Chapter 4 est. test of hypothesis
 
Sample size
Sample sizeSample size
Sample size
 
Null hypothesis AND ALTERNAT HYPOTHESIS
Null hypothesis AND ALTERNAT HYPOTHESISNull hypothesis AND ALTERNAT HYPOTHESIS
Null hypothesis AND ALTERNAT HYPOTHESIS
 
Hypothesis Testing Lesson 1
Hypothesis Testing Lesson 1Hypothesis Testing Lesson 1
Hypothesis Testing Lesson 1
 
Hypothesis
HypothesisHypothesis
Hypothesis
 
L hypo testing
L hypo testingL hypo testing
L hypo testing
 
Review & Hypothesis Testing
Review & Hypothesis TestingReview & Hypothesis Testing
Review & Hypothesis Testing
 
Critical Value and The P Value
Critical Value and The P ValueCritical Value and The P Value
Critical Value and The P Value
 
Hypothesis testing 1.0
Hypothesis testing 1.0Hypothesis testing 1.0
Hypothesis testing 1.0
 
Hypothesistesting2
Hypothesistesting2Hypothesistesting2
Hypothesistesting2
 
Rm 3 Hypothesis
Rm   3   HypothesisRm   3   Hypothesis
Rm 3 Hypothesis
 

Similar to Hypothesis testing in statistics

WHAT IS PROBABILITYInsight into the use of probability .docx
WHAT IS PROBABILITYInsight into the use of probability .docxWHAT IS PROBABILITYInsight into the use of probability .docx
WHAT IS PROBABILITYInsight into the use of probability .docx
alanfhall8953
 
Example of a one-sample Z-test The previous lecture in P.docx
Example of a one-sample Z-test The previous lecture in P.docxExample of a one-sample Z-test The previous lecture in P.docx
Example of a one-sample Z-test The previous lecture in P.docx
cravennichole326
 
Example of a one-sample Z-test The previous lecture in P.docx
Example of a one-sample Z-test The previous lecture in P.docxExample of a one-sample Z-test The previous lecture in P.docx
Example of a one-sample Z-test The previous lecture in P.docx
elbanglis
 
Chapter8 introduction to hypothesis testing
Chapter8 introduction to hypothesis testingChapter8 introduction to hypothesis testing
Chapter8 introduction to hypothesis testing
BOmebratu
 

Similar to Hypothesis testing in statistics (20)

W7D1.pptx
W7D1.pptxW7D1.pptx
W7D1.pptx
 
Bayes Theorem
Bayes TheoremBayes Theorem
Bayes Theorem
 
RESEARCH METHODS LESSON 3
RESEARCH METHODS LESSON 3RESEARCH METHODS LESSON 3
RESEARCH METHODS LESSON 3
 
Research methodology iii
Research methodology iiiResearch methodology iii
Research methodology iii
 
Testing of Hypothesis combined with tests.pdf
Testing of Hypothesis combined with tests.pdfTesting of Hypothesis combined with tests.pdf
Testing of Hypothesis combined with tests.pdf
 
WHAT IS PROBABILITYInsight into the use of probability .docx
WHAT IS PROBABILITYInsight into the use of probability .docxWHAT IS PROBABILITYInsight into the use of probability .docx
WHAT IS PROBABILITYInsight into the use of probability .docx
 
Example of a one-sample Z-test The previous lecture in P.docx
Example of a one-sample Z-test The previous lecture in P.docxExample of a one-sample Z-test The previous lecture in P.docx
Example of a one-sample Z-test The previous lecture in P.docx
 
Example of a one-sample Z-test The previous lecture in P.docx
Example of a one-sample Z-test The previous lecture in P.docxExample of a one-sample Z-test The previous lecture in P.docx
Example of a one-sample Z-test The previous lecture in P.docx
 
4_5875144622430228750.docx
4_5875144622430228750.docx4_5875144622430228750.docx
4_5875144622430228750.docx
 
review of testing hypothesis.pptx
review of testing hypothesis.pptxreview of testing hypothesis.pptx
review of testing hypothesis.pptx
 
Chapter 28 clincal trials
Chapter 28 clincal trials Chapter 28 clincal trials
Chapter 28 clincal trials
 
40007 chapter8
40007 chapter840007 chapter8
40007 chapter8
 
Chapter8 introduction to hypothesis testing
Chapter8 introduction to hypothesis testingChapter8 introduction to hypothesis testing
Chapter8 introduction to hypothesis testing
 
Hypothesis test
Hypothesis testHypothesis test
Hypothesis test
 
Hypothesis testing - Primer
Hypothesis testing - PrimerHypothesis testing - Primer
Hypothesis testing - Primer
 
Hypothesis and t-tests
Hypothesis and t-testsHypothesis and t-tests
Hypothesis and t-tests
 
Chapter 18 Hypothesis testing (1).pptx
Chapter 18 Hypothesis testing (1).pptxChapter 18 Hypothesis testing (1).pptx
Chapter 18 Hypothesis testing (1).pptx
 
P-values the gold measure of statistical validity are not as reliable as many...
P-values the gold measure of statistical validity are not as reliable as many...P-values the gold measure of statistical validity are not as reliable as many...
P-values the gold measure of statistical validity are not as reliable as many...
 
Hypothesis testing.ppt
Hypothesis testing.pptHypothesis testing.ppt
Hypothesis testing.ppt
 
Hypothesis
HypothesisHypothesis
Hypothesis
 

Recently uploaded

Obat aborsi Jakarta Timur Wa 081225888346 Jual Obat aborsi Cytotec asli Di Ja...
Obat aborsi Jakarta Timur Wa 081225888346 Jual Obat aborsi Cytotec asli Di Ja...Obat aborsi Jakarta Timur Wa 081225888346 Jual Obat aborsi Cytotec asli Di Ja...
Obat aborsi Jakarta Timur Wa 081225888346 Jual Obat aborsi Cytotec asli Di Ja...
icha27638
 
Spauldings classification ppt by Dr C P PRINCE
Spauldings classification ppt by Dr C P PRINCESpauldings classification ppt by Dr C P PRINCE
Spauldings classification ppt by Dr C P PRINCE
DR.PRINCE C P
 
Abortion pills in Abu Dhabi ௵+918133066128௹Un_wandted Pregnancy Kit in Dubai UAE
Abortion pills in Abu Dhabi ௵+918133066128௹Un_wandted Pregnancy Kit in Dubai UAEAbortion pills in Abu Dhabi ௵+918133066128௹Un_wandted Pregnancy Kit in Dubai UAE
Abortion pills in Abu Dhabi ௵+918133066128௹Un_wandted Pregnancy Kit in Dubai UAE
Abortion pills in Kuwait Cytotec pills in Kuwait
 
INTERNATIONAL HEALTH AGENCIES BY ANUSHRI SRIVASTAV.pptx
INTERNATIONAL HEALTH AGENCIES BY ANUSHRI SRIVASTAV.pptxINTERNATIONAL HEALTH AGENCIES BY ANUSHRI SRIVASTAV.pptx
INTERNATIONAL HEALTH AGENCIES BY ANUSHRI SRIVASTAV.pptx
AnushriSrivastav
 
Liver Function Test.ppt MBBS A healthcare provider draws a small amoun
Liver Function Test.ppt MBBS A healthcare provider draws a small amounLiver Function Test.ppt MBBS A healthcare provider draws a small amoun
Liver Function Test.ppt MBBS A healthcare provider draws a small amoun
ssuser77fe3b
 
Cara menggugurkan kandungan paling ampuh 08561234742
Cara menggugurkan kandungan paling ampuh 08561234742Cara menggugurkan kandungan paling ampuh 08561234742
Cara menggugurkan kandungan paling ampuh 08561234742
Jual obat penggugur 08561234742 Cara menggugurkan kandungan 08561234742
 

Recently uploaded (20)

Pulse Check Decisions - RRT and Code Blue Workshop
Pulse Check Decisions - RRT and Code Blue WorkshopPulse Check Decisions - RRT and Code Blue Workshop
Pulse Check Decisions - RRT and Code Blue Workshop
 
Navigating Conflict in PE Using Strengths-Based Approaches
Navigating Conflict in PE Using Strengths-Based ApproachesNavigating Conflict in PE Using Strengths-Based Approaches
Navigating Conflict in PE Using Strengths-Based Approaches
 
Obat aborsi Jakarta Timur Wa 081225888346 Jual Obat aborsi Cytotec asli Di Ja...
Obat aborsi Jakarta Timur Wa 081225888346 Jual Obat aborsi Cytotec asli Di Ja...Obat aborsi Jakarta Timur Wa 081225888346 Jual Obat aborsi Cytotec asli Di Ja...
Obat aborsi Jakarta Timur Wa 081225888346 Jual Obat aborsi Cytotec asli Di Ja...
 
Technology transfer documentation and strategies
Technology transfer documentation and strategiesTechnology transfer documentation and strategies
Technology transfer documentation and strategies
 
Spauldings classification ppt by Dr C P PRINCE
Spauldings classification ppt by Dr C P PRINCESpauldings classification ppt by Dr C P PRINCE
Spauldings classification ppt by Dr C P PRINCE
 
Abortion pills in Abu Dhabi ௵+918133066128௹Un_wandted Pregnancy Kit in Dubai UAE
Abortion pills in Abu Dhabi ௵+918133066128௹Un_wandted Pregnancy Kit in Dubai UAEAbortion pills in Abu Dhabi ௵+918133066128௹Un_wandted Pregnancy Kit in Dubai UAE
Abortion pills in Abu Dhabi ௵+918133066128௹Un_wandted Pregnancy Kit in Dubai UAE
 
Etiology for RRT and Code Blue Workshop.
Etiology for RRT and Code Blue Workshop.Etiology for RRT and Code Blue Workshop.
Etiology for RRT and Code Blue Workshop.
 
INTERNATIONAL HEALTH AGENCIES BY ANUSHRI SRIVASTAV.pptx
INTERNATIONAL HEALTH AGENCIES BY ANUSHRI SRIVASTAV.pptxINTERNATIONAL HEALTH AGENCIES BY ANUSHRI SRIVASTAV.pptx
INTERNATIONAL HEALTH AGENCIES BY ANUSHRI SRIVASTAV.pptx
 
Mangalore * HiFi ℂall Girls Reshm@ Phone No 8250077686 Elite ℂall Serviℂe Ava...
Mangalore * HiFi ℂall Girls Reshm@ Phone No 8250077686 Elite ℂall Serviℂe Ava...Mangalore * HiFi ℂall Girls Reshm@ Phone No 8250077686 Elite ℂall Serviℂe Ava...
Mangalore * HiFi ℂall Girls Reshm@ Phone No 8250077686 Elite ℂall Serviℂe Ava...
 
GENETICS and KIDNEY DISEASES /
GENETICS and KIDNEY DISEASES            /GENETICS and KIDNEY DISEASES            /
GENETICS and KIDNEY DISEASES /
 
End of Response issues - Code and Rapid Response Workshop
End of Response issues - Code and Rapid Response WorkshopEnd of Response issues - Code and Rapid Response Workshop
End of Response issues - Code and Rapid Response Workshop
 
Anthony Edwards We Want Dallas T-shirtsAnthony Edwards We Want Dallas T-shirts
Anthony Edwards We Want Dallas T-shirtsAnthony Edwards We Want Dallas T-shirtsAnthony Edwards We Want Dallas T-shirtsAnthony Edwards We Want Dallas T-shirts
Anthony Edwards We Want Dallas T-shirtsAnthony Edwards We Want Dallas T-shirts
 
An overview of Muir Wood Adolescent and Family Services teen treatment programs.
An overview of Muir Wood Adolescent and Family Services teen treatment programs.An overview of Muir Wood Adolescent and Family Services teen treatment programs.
An overview of Muir Wood Adolescent and Family Services teen treatment programs.
 
The Power of Technology and Collaboration in Research - Rheumatology Research...
The Power of Technology and Collaboration in Research - Rheumatology Research...The Power of Technology and Collaboration in Research - Rheumatology Research...
The Power of Technology and Collaboration in Research - Rheumatology Research...
 
No.1 * Nizamabad ℂall Girls Reshma 👉 Just ℂALL ME: 8250077686 ✅❤️💯low cost un...
No.1 * Nizamabad ℂall Girls Reshma 👉 Just ℂALL ME: 8250077686 ✅❤️💯low cost un...No.1 * Nizamabad ℂall Girls Reshma 👉 Just ℂALL ME: 8250077686 ✅❤️💯low cost un...
No.1 * Nizamabad ℂall Girls Reshma 👉 Just ℂALL ME: 8250077686 ✅❤️💯low cost un...
 
clostridiumbotulinum- BY Muzammil Ahmed Siddiqui.pptx
clostridiumbotulinum- BY Muzammil Ahmed Siddiqui.pptxclostridiumbotulinum- BY Muzammil Ahmed Siddiqui.pptx
clostridiumbotulinum- BY Muzammil Ahmed Siddiqui.pptx
 
Liver Function Test.ppt MBBS A healthcare provider draws a small amoun
Liver Function Test.ppt MBBS A healthcare provider draws a small amounLiver Function Test.ppt MBBS A healthcare provider draws a small amoun
Liver Function Test.ppt MBBS A healthcare provider draws a small amoun
 
Young & Hot ℂall Girls Mumbai 8250077686 WhatsApp Number Best Rates of Mumbai...
Young & Hot ℂall Girls Mumbai 8250077686 WhatsApp Number Best Rates of Mumbai...Young & Hot ℂall Girls Mumbai 8250077686 WhatsApp Number Best Rates of Mumbai...
Young & Hot ℂall Girls Mumbai 8250077686 WhatsApp Number Best Rates of Mumbai...
 
Cara menggugurkan kandungan paling ampuh 08561234742
Cara menggugurkan kandungan paling ampuh 08561234742Cara menggugurkan kandungan paling ampuh 08561234742
Cara menggugurkan kandungan paling ampuh 08561234742
 
Mike Lowe’s cancer fight lowe strong shirt
Mike Lowe’s cancer fight lowe strong shirtMike Lowe’s cancer fight lowe strong shirt
Mike Lowe’s cancer fight lowe strong shirt
 

Hypothesis testing in statistics

  • 2. NOT EVERYTHING YOU’RE TOLD IS ABSOLUTELY CERTAIN • The trouble is, how do you know when what you’re being told isn’t right? Hypothesis tests give you a way of using samples to test whether or not statistical claims are likely to be true. They give you a way of weighing the evidence and testing whether extreme results can be explained by mere coincidence.
  • 3. NEW SCENARIO Statsville’s new miracle drug • Statsville’s leading drug company has produced a new remedy for curing snoring. Frustrated snorers are flocking to their doctors in hopes of finding nightly relief. • The drug company claims that their miracle drug cures 90% of people within two weeks, which is great news for the people with snoring difficulties. The trouble is, not everyone’s convinced
  • 4. • The doctor at the Statsville Surgery has been prescribing SnoreCull to her patients, but she’s disappointed by the results. She decides to conduct her own trial of the drug. • She takes a random sample of 15 snorers and puts them on a course of SnoreCull for two weeks. After two weeks, she calls them back in to see whether their snoring has stopped. • Here are the results:
  • 5. • If the drug cures 90% of people, how many people in the sample of 15 snorers would you expect to have been cured? What sort of distribution do you think this follows?
  • 6. • 90% of 15 is 13.5, so you’d expect 14 people to be cured. Only 11 people in the doctors sample were cured, which is much lower than the result you’d expect • There are a specific number of trials and the doctor is interested in the number of successes, so the number of successes follows a binomial distribution. If X is the number of successes then X ~ B(15, 0.9).
  • 7. SO WHAT’S THE PROBLEM? • Here’s the probability distribution for how many people the drug company says should have been cured by the snoring remedy. • So why the discrepancy?
  • 8. • The drug company might not be deliberately telling lies, but their claims might be misleading. • It’s possible that the tests of the drug company were flawed, and this might have resulted in misleading claims being made about SnoreCull. They may have inadvertent conducted flawed or biased tests on SnoreCull, which resulted in them making inaccurate predictions about the population. If the success rate of SnoreCull is actually lower than 90%, this would explain why only 11 people in the sample were cured.
  • 9. The drug company’s claims might actually be accurate. • Rather than the drug company being at fault, it’s always possible that the patients in the doctor’s sample may not have been representative of the snoring population as a whole. It’s always possible that the snoring remedy does cure 90% of snorers, but the doctor just happens to have a higher proportion of people in her sample whom it doesn’t cure. In other words, her sample might be biased in some way, or it could just come down to there being a small number of patients in the sample. Resolving the conflict from 50,000 feet • So how do we resolve the conflict between the doctor and the drug company? Let’s take a very high level view of what we need to do. We can resolve the conflict between the drug company and the doctor byputting the claims of the drug company on trial. • In other words, we’ll accept the word of the drug company by default, but if there’s strong evidence against it, we’ll side with the doctor instead.
  • 11. • In general, this process is called hypothesis testing, as you take a hypothesis or claim and then test it against the evidence. Let’s look at the general process for this.
  • 12. THE SIX STEPS FOR HYPOTHESIS TESTING • Here are the broad steps that are involved in hypothesis testing. We’ll go through each one in detail in the following pages.
  • 13. THE DRUG COMPANY’S CLAIM • According to the drug company, SnoreCull cures 90% of patients within 2 weeks. We need to accept this position unless there is sufficiently strong evidence to the contrary. • The claim that we’re testing is called the null hypothesis. It’s represented by H0, and it’s the claim that we’ll accept unless there is strong evidence against it.
  • 14. SO WHAT’S THE NULL HYPOTHESIS FOR SNORECULL? • The null hypothesis for SnoreCull is the claim of the drug company: that it cures 90% of patients. This is the claim that we’re going to go along with, unless we find strong evidence against it. • We need to test whether at least 90% of patients are cured by the drug, so this means that the null hypothesis is that p = 90%. So what’s the alternative? • We’ve looked at what the claim is we’re going to test, the null hypothesis, but what if it’s not true? What’s the alternative?
  • 15. • The counterclaim to the null hypothesis is called the alternate hypothesis. It’s represented by H1, and it’s the claim that we’ll accept if there’s strong enough evidence to reject H0. • The doctor believes that SnoreCull cures less than 90% of people, so this means that the alternate hypothesis is that p < 90%.
  • 16. • When hypothesis testing, you assume the null hypothesis is true. If there’s sufficient evidence against it, you reject it and accept the alternate hypothesis. Step 2: Choose your test statistics • Now that you’ve determined exactly what it is you’re going to test, you need some means of testing it. You can do this with a test statistic. The test statistic is the statistic that you use to test your hypothesis. It’s the statistic that’s most relevant to the test. What’s the test statistic for SnoreCull? • In our hypothesis test, we want to test whether SnoreCull cures 90% of people or more. To test this, we can look at the probability distribution according to the drug company, and see whether the number of successes in the sample is significant. • If we use X to represent the number of people cured in the sample, this means that we can use X as our test statistic. There are 15 people in the sample, and the probability of success according to the drug company is 0.9. As X follows a binomial distribution, this means that the test statistic is actually:
  • 17. • We choose the test statistic according to H0, the null hypothesis. • We need to test whether there is sufficient evidence against the null hypothesis, and we do this by first assuming that H0 is true. We then look for evidence that contradicts H0. For the SnoreCull hypothesis test, we assume that the probability of succes,s is 0.9 unless there is strong evidence against this being true. • To do this, we look at how likely it is for us to get the results we did, assuming the probability of success is 0.9. In other words, we take the results of the sample and examine the probability of getting that result.We do this by finding a critical region.
  • 18. STEP 3: DETERMINE THE CRITICAL REGION • The critical region of a hypothesis test is the set of values that present the most extreme evidence against the null hypothesis. • Let’s see how this works by taking another look at the doctor’s sample. If 90% or more people had been cured, this would have been in line with the claims made by the drug company. As the number of people cured decreases, the more unlikely it becomes that the claims of the drug company are true. • Here’s the probability distribution:
  • 19. AT WHAT POINT CAN WE REJECT THE DRUG COMPANY CLAIMS? • What we need is some way of indicating at what point we can reasonably reject the null hypothesis, and we can do this by specifying a critical region. If the number of snorers cured falls within the critical region, then we’ll say there is sufficient evidence to reject the null hypothesis. If the number of snorers cured falls outside the critical region, then we’ll accept that there isn’t sufficient evidence to reject the null hypothesis, and we’ll accept the claims of the drug company. We’ll call the cut off point for the critical region c, the critical value. • So how do we choose the critical region?
  • 20. TO FIND THE CRITICAL REGION, FIRST DECIDE ON THE SIGNIFICANCE LEVEL • Before we can find the critical region of the hypothesis test, we first need to decide on the significance level. The significance level of a test is a measure of how unlikely you want the results of the sample to be before you reject the null hypothesis Ho. Just like the confidence level for a confidence interval, the significance level is given as a percentage. • As an example, suppose we want to test the claims of the drug company at a 5% level of significance. This means that we choose the critical region so that the probability of fewer than c snorers being cured is less than 0.05. It’s the lowest 5% of the probability distribution.
  • 21. • The significance level is normally represented by the Greek letter𝛼. The lower 𝛼 is, the more unlikely the results in your sample need to be before we reject Ho. So what significance level should we use? • Let’s use a significance level of 5% in our hypothesis test. This means that if the number of snorers cured in the sample in the lowest 5% of the probability distribution, then we will reject the claims of the drug company. If the number of snorers cured lies in the top 95% of the probability distribution, then we’ll decide there isn’t enough evidence to reject the null hypothesis, and accept the claims of the drug company. If we use X to represent the number of snorers cured, then we define the critical region as being values such that
  • 22. • When you’re constructing a critical region for your test, another thing you need to be aware of is whether you’re conducting a one-tailed or two-tailed test. Let’s look at the difference between the two, and what impact this has on the critical region? • A one-tailed test is where the critical region falls at one end of the possible set of values in your test. You choose the level of the test—represented by 𝛼—and then make sure that the critical region reflects this as a corresponding probability. • The tail can be at either end of the set of possible values, and the end you use depends on your alternate hypothesis H1. • If your alternate hypothesis includes a < sign, then use the lower tail, where the critical region is at the lower end of the data. • If your alternate hypothesis includes a > sign, then use the upper tail, where the critical region is at the upper end of • the data. We’re using a one-tailed test for the SnoreCull hypothesis test with the critical region in the lower tail, as our alternate hypothesis is that p < 0.9.
  • 23.
  • 24. TWO-TAILED TESTS • A two-tailed test is where the critical region is split over both ends of the set of values. You choose the level of the test  , and then make sure that the overall critical region reflects this as a corresponding probability by splitting it into two. Both ends contain  /2, so that the total is  . • You can tell if you need to use a two-tailed test by looking at the alternate hypothesis H1. If H1 contains a  sign, then you need to use a two-tailed test as you are looking for some change in the parameter, rather than an increase or decrease. • We would have used a two-tailed test for our SnoreCull if our alternate hypothesis had been p  0.9. We would have had to check whether significantly more or significantly fewer than 90% of patients had been cured
  • 25. FIND THE P-VALUE • Now that we’ve looked at critical regions, we can move on to step 4, finding the p-value. • A p-value is the probability of getting a value up to and including the one in your sample in the direction of your critical region. It’s a way of taking your sample and working out whether the result falls within the critical region for your hypothesis test. In other words, we use the p-value to say whether or not we can reject the null hypothesis. How do we find the p-value? • How we find the p-value depends on our critical region and our test statistic. For the SnoreCull test, 11 people were cured, and our critical region is the lower tail of the distribution. This means that our p-value is P(X 11), where X is the distribution for the number of people cured in the sample. • As the significance level of our test is 5%, this means that if P(X 11) is less than 0.05, then the value 11 falls within the critical region, and we can reject the null hypothesis.
  • 26. • We know from step 2 that X ~ B(15, 0.9). What’s P(X ≤ 11)?
  • 27. • A p-value is the probability of getting the results in the sample, or something more extreme, in the direction of the critical region. • In our hypothesis test for SnoreCull, the critical region is the lower tail of the probability distribution. In order to see whether 11 people being cured of snoring is in the critical region, we calculated P(X 11), as this is the probability of getting a result at least as extreme as the results of our sample in the direction of the lower tail. • Had our critical region been the upper tail of the probability distribution instead, we would have needed to find P(X 11). We would have counted more extreme results as being greater than 11, as these would have been closer to the critical region.
  • 28. STEP 5: IS THE SAMPLE RESULT IN THE CRITICAL REGION? • Now that we’ve found the p-value, we can use it to see whether the result from our sample falls within the critical region. If it does, then we’ll have sufficient evidence to reject the claims of the drug company • Our critical region is the lower tail of the probability distribution, and we’re using a significance level of 5%. This means that we can reject the null hypothesis if our p-value is less that 0.05. As our p-value is 0.0555, this means that the number of people cured by SnoreCull in the sample doesn’t fall within the critical region.
  • 29. STEP 6: MAKE YOUR DECISION • We’ve now reached the final step of the hypothesis test. We can decide whether to accept the null hypothesis, or reject it in favor of the alternative. • The p-value of the hypothesis test falls just outside the critical region of the test. This means that there isn’t sufficient evidence to reject the null ,In other words: We accept the claims of the drug company hypothesis.