# C3_W4 p_value

this lecture
when alpha =0.05 that means we are 2 sigma to right/left of mu?
so this will take me to mu=66.7 +6 =72.7? But in the image he puts it right at 68.442.
Also I calculated z=68.442-66.7/(9/10) = 1.93 which gives z score=0.0268 not 0.0332 (which I could not see in the table!).

@Hassan_Mohamed6 Note, technically your 95% confidence level (thus the Î± = 0.05) is 1.96 standard deviations from the mean, not 2. Or to put it inversely, weâre interested in the 0.05 because we are trying to determine if the mean being tested lies in the tails of the distribution (i.e. reject hypothesis). [P.s. sorry if I made any mistake on thisâŠ Did not take this specific classâŠ Refreshing myself now but I see he is speaking specifically about Type I error in this case, i.e. a false positiveâŠ]

1 Like

Hello @Hassan_Mohamed6,

You didnât have the right sigma value. Check these out:

Cheers,
Raymond

1 Like

Oh, I missed the first part. The â95% confidence intervalâ spans over both sides of the mean, in other words, P( X > âmean + 2sigmaâ ) ~ 2.5% (not 5%), so you cannot use this âmean + 2sigmaâ to compare with \alpha when it is a one-tail test.

Cheers,
Raymond

1 Like

Oops. Sorry I should have watched the video-- Didnât notice this was one tailed, but you are correct.

1 Like

I am so confused I cannot even ask the correct question. In YouTube I watched some videos and found them understandable more than this lecture.
One thing the YouTube videos use standard normal distribution. What is the difference between using standard and non standard form in tackling p-value problem.
I need a good stat book especially for hypnosis test

@Hassan_Mohamed6 donât worry, youâll get it.

Unfortunately I tried but I am not a Mentor so I donât have access to that lecture (unless I enroll and pay for it (!), which I donât want to) but for the moment based on what I see, try this out for yourself and you can follow the steps for the Hypothesis Test Calculator at 365datascience.com (Hypothesis Test Calculator | 365 Data Science).

All the needed values are given to you. Iâll post the input and results you should get:

The only other thing to note here is they end us with a p-value of 0.9668, but we are interested in or that Prof. Ng is pointing to the right tail or the part in yellow in the bell curveâŠ So given that we know the integral or sum of all the probabilities under the curve is 1. Thus, 1 - 0.9668 = 0.0332, which Prof. Ng points out in the slide. (The 0.9668 is all the âemptyâ area to the left of the yellow region under the curve)

Iâd definitely check out the site and play with the calculator. In addition to this they auto generate Python/R code to perform this calculation and there is a long discussion of hypothesis testing and how it works after that.

Hope this helps, but feel free to ask again if you still have questions.

1 Like

@Hassan_Mohamed6, what made you think that there is a non standard normal distribution in this thread?

Instructor uses normal distribution with mu =66.7 instead of zero

@Hassan_Mohamed6 ÎŒ is only ever zero in either 1) the âtheoreticalâ case 2) you have normalized your data.

Here he is looking at the distribution of some âactualâ, non-normalized data (heights I believe ?) All the same rules apply in either case, but for the heights data set, your mean or average is 66.7 which is why the curve is centered around that point.

There are some other actual distributions (ex. the Poisson distribution, for one) where the math is a bit different, but the thinking is the same.

1 Like

Oh! That standard, ofcourse, you are right, @Hassan_Mohamed6!

I think @Nevermnd has made a wonderful point that there is no guarantee that \mu is always 0. In fact, we usually do hypothesis tests (or A/B tests) for practical cases like, in a commerical environment, studying user behavior against product managerâs intervention. For example, a PM wants to increase the conversion rate for âfrom cart to purchaseâ by redesigning the UI such that a purchase botton is always within usersâ eyesight.

On a âsuccessfulâ test, the PM may claim that the conversaion rate has changed from 20% to 50% beyond the alpha threshold, and these two numbers, including the non-zero 20%, are numbers that your manager, your marketing colleagues, and your customer service team lead can understand in one millisecond without any further explanation.

You tell them it is a change from 20% to 50%, they all stand up and applaud!

You tell them it is a change from 0% to 30%, question marks above their heads! Imagine the CEO and an investor of your company were sitting on the same table listening to your presentation, you wouldnât want to say â0% to 30%â and delay that moment of joy and celebration with all the explanations.

Examples like this mean that the metric you are monitoring for (conversaion rate here) is seldom 0 before the intervention, and so we would better get used to having a non standard normal distribution for our H_0.

Cheers,
Raymond