Sitemap
Source: Google

You are an owner of multiple stores across India selling Coolers and you want to know the mean demand of Cooler units per month per store during summer as due to heatwaves you are expecting the demand to go up this time. Historically the mean units of cooler sold per store per month are 120 and you want to check the assumption that the average units required this month will be different from 120 or not.

Some facts about the population:

Population mean(μ) -120, Standard deviation(𝜎)-36

Let's try to formulate the Null and the Alternate hypothesis of the example.

As the Null hypothesis is always the status quo and the alternate hypothesis is the negation of that.

H0- μ = 120, H1- μ 120

1. Calculate the value of the z-score(explained in the previous post) for the sample mean point on the distribution
2. Calculate the p-value from the cumulative probability for the given z-score using the z-table
3. Decide based on the p-value (multiply it by 2 for a two-tailed test) with respect to the given value of α (significance value or confidence level). It will be 5% if we are 95% confident.This is the same value we will take for our example

μx = μ = 120 and Standard error = 𝜎/√𝑛 = 36/√36=36/6=6

Z = (​​x-μx) / (σ/​√x​) = (140.5–120)/6 = 3.41

Cumulative probability from Z table for 3.41 is .99968

p-value for 2-tailed test= 2*(1-.99968) = 0.00064 = 0.064%

As this is two tailed test 2.5% of the critical region will lie on both side of the distribution, cumulative probability of UCV is (1–0.025) = 0.975.

μx = μ = 120 and Standard error = 𝜎/√𝑛 = 36/√36=36/6=6

From Z table the Z-score for 0.975 probability is 1.96

CV = μ+(Z*Standard Error), UCV = 120+(1.96*6) = 131.76, LCV = 120-(1.96*6)=108.24. As our sample mean is above the UCV, we will be “Rejecting the null hypothesis”

--

--

Nirmal Maheshwari
Nirmal Maheshwari

Written by Nirmal Maheshwari

A Common Data Scientist who was once a aspiring one. Here to make it easy for other aspiring data scientist to crack the interviews.