Concept of Hypothesis Testing
 We calculate the statistic by standardizing and we check if that value is in rejection region. If the statistic (test of the hypothesis) we found in rejection region we reject the null hypothesis else we accept the null hypothesis
Errors in Hypothesis Testing

Errors in Hypothesis testing are of two types
 Type I Error:
 Reject a true null hypothesis
 This depends on significance level
 Can be represented as False Positive
 Type II Error
 Accept a false null Hypothesis
 This is represented by beta
 False Negative
 Rejecting a false Null hypothesis is (1beta) => Goal of hypothesis testing a.k.a power of test
 Type I Error:

Status Quo (H0)

Hypothesis Testing Can be done for
 Single Population
 Multiple Populations

Lets Start By doing an example on Single Population with known Population variance.
 Glass door has published a research where mean data scientist salary is 113k
 This attached sample has known standard deviation of 15000 $
 Try to do hypothesis testing to find out whether to accept or reject the Glassdoor research
 Null Hypothesis H0: μ0 is equal $113000
 Alternative Hypothesis H1: μ0 not equals to $113000
 In this case we have to standardize and we need to calculate the statistic Zscore represented by Z
 z => one from the ztable will be referred as critical value
 Since this two sided test we need to calculate alpha/2
 Decision rule => IF absolute value of ZScore > positive critical value (z) reject the null hypothesis
 According to the hypothesis testing which we have done the results are shown below
 We reject the null hypothesis at 1% and 5% significance levels as well.
 Exercise: Try to test null hypothesis and 10% signifance level

PValue:
 A level of significance after which we can no longer reject the null hypothesis
 This is the smallest level of significance at which we can still reject the null hypothesis
 To calculate PValues we can use online calculators Refer Here
 We should reject the null hypothesis if Pvalue < α (level of significance)
 Example – 1:
 Standard error => 2739
 Population std => 15000
 number of samples => 30
 Zscore => 4.67
 Example – 2:
 Zscore => 2.12 (Assumption)
 critical value at 10% significance => α => 0.1 => critical value α/2 => 1.65 (Reject)
 critical value at 5% significance => α => 0.05 => critical value α/2 => 1.96 (Reject)
 critical value at 1% significance => α => 0.01 => critical value α/2 => 2.58 => Cannot reject
 PValue in this case is .034006 i.e when pvalue < α reject the null hypothesis
 We can reject the null hypothesis as long as significance level is greater than 3.4%