In this blog I cover Hypothesis Testing, I have tried to explain it in a simple way, also I have given couple of scenarios where we need to build hypothesis testing.
What is a Hypothesis ? : In statistics a hypothesis is a premise or a claim that we want to test or to investigate.
So how do we test or investigate ?
We do a survey, get a sample data, and we use that sample data to test the claim.
What is a Null Hypothesis ?
Null Hypothesis means the default hypothesis, i.e the thing that is kind of a established.
It is denoted as Ho.
Ho : Currently accepted value for a parameter
When we are looking at a parameter of population, we have a currently established thing,
may be a mean value of IQ or something based on previous study
What is Alternate Hypothesis ?
Alternative Hypothesis: also called as research hypothesis and is denote as Ha
Ha : It involves the claim to be tested.
Eg. Suppose it is believed that a candy machine makes chocolate bars that are on average 5g.
A worker claims that a machine after maintenance no longer makes 5g bars.
Null Hypothesis Ho : mu = 5g
Alternate Hypothesis Ha : mu <> 5g
Null hypothesis and Alternate hypothesis are mathematical opposites
Possible outcomes of this test :
1. Either reject Ho in favour of alternate hypothesis
2. OR fail to reject Ho
Test Statistic: Calculated for sample data .
Level of Confidence : How confident are we in our decision (usually taken as 95%)
Level of significance : Alpha = 1 – Level of confidence = 1-0.95 = 0.05
A company states that they make soda straws of 4 mm diameter.
A worker believes that machine no longer makes straws of this size, he samples 100 straws
to perform hypothesis test with 99% confidence
Ho : average straw diameter = 4 mm
Ha : average straw diameter <> 4 mm
Doctor believe that avg teen sleeps on an avg. no longer than 10 h per day.
A researcher believes that teens on avg. sleep longer
Ho: average sleep hours of a teenager <= 10
Ha: avg. sleep hours of a teenager > 10
School board claims that atleast 60% of students bring mobile ph to a school
A teacher believes that this no. is too high and randomly selects 30 students to test
at a level of significance of 0.02.
Ho : p >= 0.60 [ where p proportion of students bringing mobile ]
Ha : p < 0.60
confidence level = 1-0.02 = 0.98 ~ 98%