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!).
image

@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:

image

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

Thanks, Anthony @Nevermnd, for sharing the steps and your additional explanation!

@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