Calculating Power and the Probability of a Type II Error (A Two-Tailed Example)
Вставка
- Опубліковано 7 вер 2024
- An example of calculating power and the probability of a Type II error (beta), in the context of a two-tailed Z test for one mean. Much of the underlying logic holds for other types of tests as well.
I have a related video with a one-tailed Z test example available at • Calculating Power and ... .
You are welcome Fatima. I'm glad you found of my videos helpful!
You are the reason I passed my probability course and you will be the reason I pass my Stats course. Thank you :)
I'm helping my daughter through college statistics right now. So, I have looked at literally dozens of other UA-cam sites. Your treatment of the subject, explanations and examples are by far the best on UA-cam. I would very much like to know what software you are using to display your wonderful graphs and text. I think it would help me as well. Thank you again
Hi Anthony. Thanks very much for the kind words. I'm inclined to agree :)
The background is a pdf presentation created in Latex/Beamer. The handwriting annotation in my videos is done using Skim, and I record and edit in Screenflow. All statistical analysis and plotting was done in R. Cheers.
Thank you so much for this, I've been looking everywhere and reading everything trying to figure out how to calculate the power.
+Warren Barksdale You are very welcome Warren!
This is very well done. Your examples are carefully chosen, your pace supportive, and the explanations clear. Thank you!
I consistently return to this channel - thank you for all of the shared knowledge!
I know this is an old post, but this was so helpful. Thank you so much for the great explanation.
You are welcome! I'm glad to be of help. I hope the rest of your class goes well.
I believe you mixed up power and type two error. The value we find from the z score table, the area of overlap should be the beta error, not the power.
No, I did not make that error.
Hi, I was thinking the same thing after seeing the One-Tailed video then seeing this one. Here is a rationalization that helped me figure out what is actually going on. (Your comment is 4 years old so this is more to help me remember on my exam than it is for you.)
Recall that the null hypothesis is that the true mean is equal to 75. If the true mean is in fact 76, then the null hypothesis is false, thus the distribution of x-bar where the true mean is 76 is one where the null hypothesis is false.
Now recall that a Type-II error is the probability where we FAIL to reject the null hypothesis when it is FALSE and that the Power is the probability that we DO NOT FAIL to reject the null hypothesis when it is FALSE.
Therefore, since the distribution of x-bar where the true mean is 76 is a distribution made where for any given x-bar on the distribution the null hypothesis is false (since the true mean is actually 76 not 75), then the power is the area of the region on this distribution where we would reject the null hypothesis (Again, because the null hypothesis IS false for every x-bar in this new distribution), and the Type II Error (Beta) is the area on the distribution where we would NOT reject the null hypothesis.
(Hushed dramatic voice) Here, in the wilds of UA-cam, we have found the rare, greatly celebrated and valued, instructor who can explain things in an understandable language. Often found by either chance or by guide, these amazing individuals save our grade when the homework gets hard and the professor is a garbled mess.
This was mega useful... you clear up so many doubts....
Understanding, proving the concept is just epic.
Just want to say a very big thank you for all your videos! They are so clear and straightforward!! I'm having an exam on statistic in 2 days and I was so afraid of failing until I found your channel. Your videos really help a lot! Keep up the good work!
You are very welcome. I'm glad you've found my videos helpful. Best of luck on your exam!
I really appreciate the way you explain the steps to get to the results.
Thank you!
You are very welcome! Thanks for the feedback!
Best video about the subject i ever saw. Thank you so much, i am learning how to do that in python
You are very welcome! Thanks for the compliment!
Well organized and a natural teacher with a clear English accent. Thank you.
Thanks! Sometimes it's just a different strokes for different folks sort of thing. I'm sure my students post the same comment on other channels :)
I am the person not knowing anything about biometry and I can say that this video is very helpful
You are very welcome Zeke! I'm glad you found it helpful.
You are much better than my lecturer, and your videos are much better than others as well
youtube is messed up so it would be nice to put the playlist in the descripstion or in the i icon the next video
the H0 is rejected as there is a statistical significant evidence that you are absolutely amazing as always
you know what bro?, you are a legend.....thanks soo much
If you were doing this for a sample size calculation, would the final sample size be 16 or 32? In other words, if you wanted to find the sample size needed for achieving 7.9% power in the example, would you enroll 16 or 32 participants?
Please solve this : Suppose you want to test the null hypothesis H0 : miu=100 against the alternative hypothesis H1: miu >100 using, alpha = 0.05, the population in question is normally distributed with mean 96 and standard deviation 12. A random sample of size 42 is used ( i) Sketch the sampling distribution of X assuming that H0 is true. (ii) Find the probability of type II error and power of the test.
great instruction - makes it understandable and seem 'easy'. Appreciate the time you spent creating these.
9:35 but does it really make sense? I mean the probability of Type II error is 0.921. It's like always, meaning there is 92% chance that when we failed to reject Null Hypothesis and we are wrong. Ain't that crazy? I thought It should be another way around. The power of test is 92% and the type II error is 0.079...
What is the intuition behind this, because this totally confuses me
Denis Grebennicov I was thinking exactly the same. A few other people have noted the same error in the comments but the instructor insists that it’s all good.
@@simbarashey Hi, I was thinking the same thing after seeing the One-Tailed video then seeing this one. Here is a rationalization that helped me figure out what is actually going on. (Your comment is 3 years old so this is more to help me remember on my exam than it is for you.)
Recall that the null hypothesis is that the true mean is equal to 75. If the true mean is in fact 76, then the null hypothesis is false, thus the distribution of x-bar where the true mean is 76 is one where the null hypothesis is false.
Now recall that a Type-II error is the probability where we FAIL to reject the null hypothesis when it is FALSE and that the Power is the probability that we DO NOT FAIL to reject the null hypothesis when it is FALSE.
Therefore, since the distribution of x-bar where the true mean is 76 is a distribution made where for any given x-bar on the distribution the null hypothesis is false (since the true mean is actually 76 not 75), then the power is the area of the region on this distribution where we would reject the null hypothesis (Again, because the null hypothesis IS false for every x-bar in this new distribution), and the Type II Error (Beta) is the area on the distribution where we would NOT reject the null hypothesis.
those are the best statistics videos on UA-cam. Thank you!!
You are very welcome. Thanks for the kind words!
Thank you so much for this such clean, clear expressed video with area of color and curve - that's So helpful to a clear understanding!
it was an excellent leacture which gives the deep knowledge with most easiest and efficent way.
Thanks!
i just dont get: how did you get 0.0721 from the table (when 1.46)? when i look in the table -1.46 gives me 0.0721 but 1.46 gives me 0,9279 ..
+YM mose Because its a probability being greater than 1.46, you look up the value of 1.46 and then do 1 minus that answer.
I didn't understand, can you explain again please
If you're looking for the area above that area in the curve, you do 1-p. So it 1.46 gives you 0.9279, it means the probability that a value falls to the left of the curve is that, but the probability that it falls on the right is 1-0.9279, or 0.0721.
Thanks for the cool visuals and clear explanation.
Oh thank you for this. My textbook did not explain this at all, and I'm supposed to be able to calculate this for an exam.
The probability of a type 2 error is equivalent to 1 minus the probability that null is rejected given null is false. We know null is false already, so its just the probability that you get a value below/above the rejection threshold of the false hypothesis mean, using the true mean's distribution. I.e. if you find which values are rejected using the false hypothesis, then find the likelihood of getting those values using the true mean, you'll have the probability that you reject the false hypothesis given the hypothesis is false (and you're assisted by being told the true mean, allowing you to accurately find the chance that you obtain values that make the false hypothesis disproven). The type 2 error then is just 1-power (power=1-B) because the two events are mutually exclusive and exhaustive.
My issue is ive been given a problem where I have alpha, the true mean, a mean from a sample of 72, and the false hypothesis mean along with std. dev of that false pop mean, and I have yet to figure out a way to solve this and im pretty sure the multiple choice answers ive been given are all wrong (or the wording of the question is wrong, and its totally vague).
I thought that for n
Angel Sanchez if you know the population variance you can use z.
I am pretty sure power of a test = 1- beta
And beta = probability of type 2 error
This explanation is fantastic
Thanks!
Your are the best of the best
you explain things as easy as 1 2 3
thank you so much you made me not drop my class
Hi. If you comment ADF unit root test and Hosmer Lemeshow Test, I will understand.ADF test H0:there is unit root H1:no , hosmer lemeshow test h0:model is suitable for data h1:not. Both of them is not powerful test?Or only hosmer lemeshow is not powerful? Because hypothesis of the test are opposite. Desired situation is H1 in ADF test but desired situation is H0 in Hosmer Lemow test.Thanks
omg, you are my only STAT teacher!!!!!
+tim tim I'm glad I can be of help!
its amazing how you explain quantitative research.Good luck..
Thanks Mourice!
Great explanation! But how would you find the type 2 error if the variance is unknown? Is it different if since you are using a t-test instead of a z test?
I watched the video a few times but i still don’t understand why one case scenario it was calculating the one area lying between the values and the other calculating the area outside of the values, could you or anyone explain, please?
I love your explanations & your voice makes it very soothing-ish :D
Thanks! I'm glad I could be of help.
VERY HELPFUL. Well and clearly described. Thank you so much.
According to my statistics class your label of Power and Beta(Type II error) at 9:41 are backwards. The areas are beta and power= 1-Beta in my class. Did you just get the names backwards or is my professor crazy?
Absolutely right, i guess @jbstatistics made a blunder. It would be great if he can correct us on this.
I'm not sure why you think I made an error here, but I didn't confuse
power and the probability of a Type II error. . Power is the probability
of rejecting a null hypothesis that is in fact false. At 9:41, what I
label as power is in fact that the probability of rejecting the null
hypothesis, which is false in the given scenario. A Type II error is
not rejecting a null hypothesis that is in fact false, and what I label
as P(Type II error) is the probability of a Type II error in the given
scenario.
@jbstatistics: I am really sorry for the comment. i am still learning and was a bit confused. Thanks a lot for your comment, and i will definitely go through it again. Also, i am pretty sure that you are 100% right and to be frank i refer to your videos whenever i encounter any doubt. I would really appreciate if you can share your fb or gmail id so that i can ask you some of my doubts. Please keep up the good work and you are the best teacher.
btw I am working as an Analyst and wanted to clarify all my concepts so that i can soon start modelling
You're welcome to bring something up if you feel there is an error, but errors are few and far between on my channel. I might possibly make a calculation error here or there, or misspeak, but it's unlikely you'll find a major conceptual mistake.
While I might respond here to offer clarification on a specific question involving one of my videos, I have absolutely no time to offer any consulting or tutoring services. All the best.
Your communications skills are effective without a doubt and 100 percent clarity, I don't mean to flatter you. This is simply a fact, I can't help praising your good work. Could you kindly do similar examples to teach us Design of Experiments? If somebody wants to motivate himself, he or she should go over your videos, and that will fire him or her up for the whole day. It is such a good feeling. Bless you.
Thank you!
But I'm confused at 8:47 sec. When I calculate 71.08-76 / (8 V16) it gives -0.154. And same for the other side: 78.91-76 / (8 V16) = 0.09 and not 1.46.. How did you come to these results?
We're dividing by 8/sqrt(16) = 8/4=2. (71.08-76)/2 = -2.46. Cheers.
Hi, tomorrow ı have exam, if someone give me answer as soon as possible, it will be so helpfull. In first situation( where we find power of test ın reject Null Hypothesis) we directly add two area and say that here is the power of test. But in reject to fail situation(when mu equals 77) we find the area and say that its our Prob. of type 2 error area, why we cant say that it is power of test in like first situation ? Thanks
why did you use the area for -1.46 instead of +1.46 at 9:20? If you say that the true mean is also 75, you should have power of 1 and I think in your example you would get power of 0.05 and 95% chance of a Type 2 error. Just looking for clarification.
Thank you
There we need the area to the right of 1.46 under the standard normal curve. The standard normal curve is symmetric about 0, so this area is the same as the area to the left of -1.46. So you can find the area to the right of 1.46, or the area to the left of -1.46, as the areas are equal.
this is so clear and easy to follow! so nice!
Hi, thank you very much. I just watched your previous video about the relationship btwn alpha, beta and power. I am now going to make notes on this. Thank you once again you have done an amazing job at explaining the basic concept.
There is an error in this video, when he refered to power it should be probability of type II error. The green area is beta and not power.
No, there is not an error of that type in this video. The green area given in the video represents the probability of rejecting the null hypothesis in a situation where it is false. That is power, not the probability of a Type II error.
Hello, I think in the beginning of the video (0:49), alpha is not the probability of making a type 1 error. It should be the maximum risk you want to tolerate when the result is caused by random. Since you know alpha before collecting data, it should not be a probability. (It is a significance level)
I'm not sure where you're coming up with this. Yes, we call it a significance level. It's a probability. What does your notion of "maximum risk" mean, if it's not a probability?
Hlo sir, why the value that which we are calculate is (beta) in one tailed and why (1-beta) in two tailed
how did you work out the 71.08 and 78.92 values?
+Christopher Pope I work through this in detail at the start of the video, ending at 4:16 or so.
for alpha/2 = .05/2 = .025 on each side of curve z critical (from Z table) is -1.96 on the left and 1.96 on the right tail. (xbar -75)/(8/sqrt(16)) = -1.96 results in xbar = 71.08 and (xbar-75)/(8/sqrt(16)) results in xbar = 78.92 Just remember 75 is the very initial population mean that was subject to test in Ho = 75
@@jbstatistics you dont show how you got it though.
@@jbstatistics please answer how you got 71.08 and 78.92
I figured it out. Xbar L = 75 - Z x (standard deviation / square root of n) and the X bar U is just the +
Why did you use z if the sample size is less than 30?
I bet this guy is Canadian because he said zed instead of Z. Nice video!
who watch it on 2020? thankyou soo much..
in order to calculate power, do you always need the "true" value of the parameter?
Yes! Exactly what I was looking for! Thank you!
Hi again,
I am just lost again lol, so I have a question asking to find the power of the test but did not give any information about the true value of mu ! Only give me the population mean e.g (2.5) and the average mean of a sample e.g (2.113) and also gave me the sd and the alpha just the same as the one you using in this example. Is it still possible to find the power of the test ?
P.S I have recommended your videos to all my friends and they loving it, keep the hard working :)
Mu represents the population mean. If you are told that the population mean is 2.5, that is the same as saying the true mean of the population is 2.5.
+jbstatistics I see, thank you
If anyone could answer this I would appreciate it :)
So I got a question to make a conclusion and I listed everything and at the end I did not reject H0 , and a sub question asks to calculate the power of the test !! I am confuse, how to calculate that even if my H0 is true and I did not reject it ?
Thank you
There is a fundamental difference between: 1) The null hypothesis being true, and 2) You not rejecting it. The first is in reference to the underlying reality, which is typically unknown. The second relates to your conclusion based on sample data, which will be known once you collect data and carry out the analysis. It is perfectly acceptable to carry out power calculations, even if one does not reject Ho. In fact, those power calculations help to determine how likely it was to reject Ho in certain situations, giving some insight into what your conclusion from the test tells you.
OH ! thank you so much, I got it now ^^
Can I use t distribution to calculate the Type II error?
Does this logic apply for 2 populations? Does it work for other parameters?
Thank you. This is beautifully clear.
Amazing explication. Congratulations
I will purchase if Mr. JBQ put all of his UA-cam video clips on a flash drive or on line that I be able to download with permission to share with others.
Could you please describe a real life situation when you know the standard deviation of the population but don't know the mean, as you show in the first part of the video? Without understanding this, I can't understand your further illustration. Thank you,
I agree that this would be a very rare situation, and I discuss this notion repeatedly in other videos (e.g. Hypothesis tests on one mean: t test or z test?) But we may very well use this method as an approximation if we have a reasonable estimate of the standard deviation from previous studies or other information. (It's impossible to do a power calculation without having some notion of the value of the variance.)
thanks =شكرا جزيلا لك لقد استفدت منك
of course I only find this channel the day before my exam
I've been here all along!
I got an 85 on the final. Thanks for the help
Good job! You're very welcome.
So, its impossible to calculate the power of a test without knowing the true population mean?
Thank you so much. vey good explanation. I enjoyed it.
Great video to bad my bad stats teacher gave me a problem of the real M being +7 of the orignial throwing my Z < -5.46
How did you get 1.96 again?
amazing video! thank you!
Thank you very much. Very clear explanation.
Thanks. Your video was really helpful.
You are very welcome.
hey so i'm a bit confused how did you get 71.08 and 78.92???
By solving for X bar in the given inequalities. e.g. (X bar -75)/(8/sqrt(16))
thanks
great job !! very easy to understand !!
U har inte o m den som hare cv evvett o u uuuå jo c
Great video! Thanks a lot.
Thank you, very helpful :)
thank you so much!
Thanks a lot!
God among statisticians!
thank you! it's so clear
Excellent
Thanks!
Very helpful, thank you
You are very welcome!
5:23
thanks so much for this !
thank you very much for this video
You are very welcome!
Thank you for this video
You are welcome.
You are great !! very understandable
Thanks!
Thank God I only had to take college algebra. I clicked on this video and ten seconds in it was like listening to Charlie Brown's teacher. Wa wa wa wa Wa wa wa wa...
This is a straaaaaaange video to click on if you're not interested in learning about calculating power and the probability of a Type II error :)
Dude. You're boss.
Super helpful!!!
THANK YOU VERY MUCH!
You are very welcome!
AWESOME!!!!!!! Thank you.
This is amazing...!!!
this is great
Thanks!
How do you do this when you don't know the true population mean?
We can check out the power for various values of mu. We can calculate an entire power curve, and see what power various deviations from the hypothesized value have.
A researcher might do some calculations, and determine what sort of sample size is required in order to have a power of 0.8, for a given true mean. In two-group problems, researchers might have a suspected effect size (effect of a treatment vs a placebo, say), and see what sample size is required in order for their experiment to have a certain power. The calculations for those are a little bit more complicated than this one, as the population standard deviation is not generally known and we must take that into account, but the overall idea is similar.
So it's definitely true that we don't actually know mu and so we can't actually calculate the power for a known value of mu, and if that true mean was actually known then we wouldn't be carrying out the test in the first place. But we can pretend we know mu, calculate the power in various scenarios, and in so doing give us some insight into the worthiness of our study and/or help us determine what sample size is needed to achieve our goals.
7:55 hahah 69!
kidding this was a godly video!
4:35