Understanding Hypothesis Testing
BIOM 2720 3/19/25 Class
Estimated read time: 1:20
Summary
In this class, Professor Steve Strain covered critical concepts related to hypothesis testing in statistical analysis, focusing particularly on the use of null (H0) and alternative hypotheses (HA), the calculation and interpretation of p-values, and type I and type II errors. He illustrated the system by which decisions on hypotheses are made based on statistical data and tests, emphasizing practical applications like determining the significance of medical data variations and the decision-making process involved in hypothesis testing. Charts and probability models illustrated these statistical concepts, preparing students for the practical testing they will encounter in their careers.
Highlights
- The class explored the concept of 'two worlds' in statistics – the hypothetical population world and the concrete sample world 🌍.
- Understanding the role of p-values is central to hypothesis testing. These values indicate whether to reject a null hypothesis given the significance threshold (alpha) ⚖️.
- Interpretation of statistical tests requires a framework for understanding type I and type II errors, which are akin to making judgment bets with statistical outcomes 💡.
- Students learned about the comparison between potential errors in hypothesis testing (Type I and II), important for making informed decisions in real-world applications 🌟.
- The process of hypothesis testing, which includes assessing statistical significance, deciding on null hypothesis rejection, and the broader implications is vital for data analysis professionals 📈.
Key Takeaways
- The null hypothesis (H0) and the alternative hypothesis (HA) are crucial for statistical studies 📊. They represent different assumptions that can be tested to understand population parameters.
- Hypothesis testing involves calculating a p-value, which helps in deciding if the results are statistically significant. The p-value compares against a threshold called alpha (commonly set at 0.05) 🧮.
- Type I errors occur when the null hypothesis is incorrectly rejected, while Type II errors occur when the null hypothesis is not rejected when it should be 🚫.
- Decisions in statistical analysis are similar to placing bets in a casino; outcomes are uncertain but follow probabilistic rules 🎲.
- Alpha is a decision threshold that measures how extreme the data must be to reject the null hypothesis – key in forming conclusions about the data ✈️.
Overview
Professor Steve Strain kicked off the class by reviewing previous lectures focusing on hypothesis types and their roles in statistical analytics. He guided the students through understanding the 'two worlds' of statistics: the imaginary population world and the concrete sample world. These form the basis for how hypotheses are structured and tested in research studies.
Central to the lecture was the breakdown of how to calculate and interpret the p-value, a critical component in determining statistical significance. By explaining the calculation process through the creation of probability models, Professor Strain simplified complex statistical concepts into digestible knowledge that students can apply practically, especially in biomedical contexts.
Lastly, the lecture tackled the understanding of errors in hypothesis testing. Professor Strain detailed type I and II errors using relatable analogies like casino betting. This helped to convey the crucial decision-making aspect of statistical testing, underlining the importance of understanding these errors in real-world statistical application. The framework provided is essential for students in their continuing studies and future careers.
Chapters
- 00:00 - 00:30: Introduction and Review of Previous Lecture In this chapter titled 'Introduction and Review of Previous Lecture', the focus is on revisiting key points from the previous lecture, lecture five. It recaps the discussion on a research study and explores different types of hypotheses. Specifically, it highlights two kinds of hypotheses that were introduced, encouraging students to recall and engage with these foundational concepts.
- 01:00 - 02:30: Two Worlds: Population and Sample The chapter titled 'Two Worlds: Population and Sample' covers the foundational concepts of null hypothesis (H0) and alternative hypothesis (HA). It explores the relationship between these two hypotheses in the context of population and sample analysis in statistics. The discussion emphasizes the significance of formulating hypotheses when conducting statistical tests, hinting at a third important element related to hypothesis testing that was not specified.
- 02:30 - 10:00: Hypothesis Testing and P-Value The chapter discusses the concept of Hypothesis Testing and P-Value. It begins by highlighting the existence of two 'worlds' - the population world and the sample world. The population world is an abstract concept that we try to understand or infer since we do not have direct access to it.
- 10:00 - 20:00: Example of Hypothesis Testing In this chapter titled 'Example of Hypothesis Testing', the discussion revolves around the concept of a sample being 'concrete'. This concreteness is attributed to the ability to measure the sample. The text suggests that measuring the sample is a fundamental part of hypothesis testing, likely implying that empirical data collection is crucial for hypothesis validation. Further elaboration on this concept may explore the methods and significance of measurement in the context of hypothesis testing.
- 30:00 - 60:00: Statistical Errors: Type I and Type II The transcript briefly touches on the concept of statistical hypotheses and the location or 'world' in which they reside, referencing the p-value and the sample mean as elements derived from data. However, it mentions little else specific about Type I and Type II errors.
- 60:00 - 90:00: Statistical Significance and Power This chapter discusses the concept of statistical significance and power in the context of hypotheses about a population. It touches upon examples such as the true mean temperature (e.g., mu equals 98.6°), explaining how hypotheses are formulated to reflect these true population parameters.
- 105:00 - 110:00: Conclusion and Next Steps In the chapter 'Conclusion and Next Steps,' the discussion revolves around understanding true values and making hypotheses about population parameters. It opens with the concept of true values, which are assertions about what the population parameter might be. These are expressed as hypotheses — such as stating a population mean equals 96 or differs from 98.6. This forms the basis of the hypothesis testing framework, distinguishing between the hypothesized population world and the sample world within which we conduct statistical tests. The significance of the p-value in the testing process is introduced, although details are not given in the transcript provided.
BIOM 2720 3/19/25 Class Transcription
- 00:00 - 00:30 last time when we were talking about lecture five we reviewed two things One of those things was about the research study Do you remember what the other thing was about yes So hypothesis there's two kinds they are
- 00:30 - 01:00 huh H and H yes H0 the null hypothesis and H A and when we talk about the hypothesis we always talk about something else there were three things these were two of them these two hypotheses the the three things went together there's one other Okay Yes Okay
- 01:00 - 01:30 Now key thing I want to review here Two worlds What are the two worlds yes we had a population world which is we have to imagine or try to infer what it is because we don't have direct access to it And then the
- 01:30 - 02:00 sample is concrete Why is it concrete because we can m word Yes we measure the the sample and that gives us
- 02:00 - 02:30 the the one no more general one one word Yeah Okay The sample mean is an example of of something that we could get from the data but um I'm just talking about in in general So what is the p value well first off where do the hypothesis live which world do they live in that's right They're over here
- 02:30 - 03:00 They're hypotheses about the population And for in so we would put for instance uh we would say sometimes mu equ= 98.6° or something like that That might be or or we might say um we use the true mean temperature true mean body
- 03:00 - 03:30 temperature Okay we talk a lot about the true values Okay and we say they either are something or not So so it's equal to 96 or ha the mu is not equal to 98.6 So we have these statements about the population parameters That's how we make our hypothesis that lives in the population world Over here in the sample world is the p value And where does the
- 03:30 - 04:00 p value relate to the sample and the data how do we get our p value there's a general scheme that I want you to get in your minds and kind of understand in reference to the population and the sample We've got the sample We've got our data Where does the p value come
- 04:00 - 04:30 from okay very good Uh the probability model and what else say a louder Um no In order to calculate the p value see anytime we do an experiment we measure the data we need to calculate a
- 04:30 - 05:00 p value What do we use to calculate the the p value the probability model and alpha is actually not needed to calculate the p value It's needed to interpret the p value But what do you use to calculate the p value do you remember you got to put something into the probability model Huh
- 05:00 - 05:30 not mu Mu is in a population world We don't know what mu is We have to use the data plus the probability model Okay Now the the formula for calculating the p value is
- 05:30 - 06:00 going to depend on which test we're doing and which probability model we're using But it's always going to get calculated from the data and and and what we get is something called a test statistic Always a test statistic It's a different test statistic for each different test But but this all allows us to
- 06:00 - 06:30 calculate the p value Okay And the p value is a single number And now once we have that p value what are we going to do we're going to compare that to y'all said it earlier Yes We're going to say P less than alpha Is it smaller than our threshold of significance
- 06:30 - 07:00 yes Then we reject H0 No Then do not reject And that is our method every time we do a test We're going to be doing statistical tests for the rest of the
- 07:00 - 07:30 term So so we make conclusions based on this p value And this probability model we hypothesize the same probability model over here Now I'm putting clouds around it because the model is kind of imaginary It's in our minds It's a mathematical uh object But what we do is these
- 07:30 - 08:00 hypotheses we relate the H0 to the probability model The probability model the p value gives us a probability of getting our data if H0 is true So we'll see how this works in an example here in the slides So let's take a look at the
- 08:00 - 08:30 slides See we might have to look at some very impressive graphics first a little bit of a review Okay so we're going to get back to the two-tailed hypothesis We talked about that last time Um we'll review that Um see we collect data and use it as evidence This on the board is how we use data as evidence for
- 08:30 - 09:00 or against uh the null hypothesis And this is what it means when we statistically analyze the data this process on the board and this gives us the p value It has a fancy graphic there and this is the probability if we are expecting no effect under the null hypothesis and and if that's true the
- 09:00 - 09:30 null hypothesis is true then any difference we see if we got a sample with you know a temperature of 99.2 2 Well then that that uh is um a random variation If the null hypothesis is true then then this is the true mean And if we got a sample with a mean of 99.2 then that's just a random variation So that's what the null hypothesis says We never know if it's
- 09:30 - 10:00 true or not We just have to decide whether we're going to go with it or reject it Sort of like going to a casino shooting dice or something Okay Now here's an example where we're going to use some actual results and we are going to use the sample mean this time Um and we're also going to compare it with a population where we do know this the the
- 10:00 - 10:30 the uh the population mean and the population standard deviation What we're going to try we're not going to try to estimate the population mean for this given population We're going to see if our sample if we think our sample is from that population So let's see what that means So read through this a moment
- 10:30 - 11:00 We're going to use this example
- 11:00 - 11:30 to illustrate how a statistical test
- 11:30 - 12:00 works How they measure the blood pressure to 0.07 But whoop Okay that was pretty Let's go All right So let's think about
- 12:00 - 12:30 this What would our null hypothesis be here see if you can reason that out What would the null hypothesis be so the term no effect might be confusing here but there's another way that it can be worded It's also called the hypothesis of no
- 12:30 - 13:00 difference So what do you think the null hypothesis might be here yeah Okay but the sample mean is 126 and the population mean is 128 So how can the sample mean not be different okay but see significantly
- 13:00 - 13:30 different you've got to that goes at the end of your test The hypothesis lives in the population worlds Okay So the idea is that here's a population and here's a group and we can say is it is it from the
- 13:30 - 14:00 same or different you cannot talk about the sample mean in the hypothesis The hypothesis is in the population world The sample is in the real world So the hypothesis is over here So this is a population So this is our mu
- 14:00 - 14:30 and uh we'll call this mu0 and we'll call this view one So what is the the the null hypothesis say so this is a sample from a population that has a true mean of mu1 So the sample mean is 126.07 It's definitely different than 128 So we
- 14:30 - 15:00 don't want to have a hypothesis to say they're different because they are different Now what you're saying about the significant difference that's where we're going with this but that's at the end of the test not in the hypothesis Okay so the hypothesis is that mu0 and mu1 are yes that the hypothesis of no difference So we'll say mu1 =
- 15:00 - 15:30 128 And then how would we put that in words the true mean systolic blood pressure of what and let's let's talk about the male
- 15:30 - 16:00 executives of the male executives You could say it's equal to 128 or you could say is not different or is no different or is not is equal to that of the
- 16:00 - 16:30 general population of males aged 34 to 44 Okay this is the the null hypothesis Notice the word sample does not appear That word does not appear in the
- 16:30 - 17:00 hypothesis The word significant or statistically significant does not appear Do not put these in your hypothesis They go in a different part of the test The hypothesis is before you even think about the sample They're just the possibilities in the population world Okay So we have a sample We know about a population here and we're going to compare our sample
- 17:00 - 17:30 with that population So we're thinking that sample came from a population Now is it this one or not if it if it's if it is then we say a zero uh and then if it's not then what would ha be alternative hypothesis would
- 17:30 - 18:00 be yes and we would say mu1 is not equal to 128 or okay so when we say that that we say we take out the word not here that makes the alternative hypothesis But there's another way we could do it Okay this is that HA can be twosided or
- 18:00 - 18:30 one-sided And this is important for calculating the p value which which you choose You can choose you have to have a good reason to do one-sided But what would one side be well this is an example of one-sided We would say that H0 is going to be less than or equal and then this will be greater than So we're only looking at if the the blood pressure of the executives is greater Or we could do the other way
- 18:30 - 19:00 around That's a one-sided hypothesis too We could have the sec the less than in the alternative there But the point is is that we are setting it up to where we take our sample and then we're going to be able to to calculate a probability for getting the sample if the null hypothesis is
- 19:00 - 19:30 true So this is what we've just done Okay And here I'm calling it mu of xbar So it we're not saying the sample mean is different We're saying the true mean of the population that we took that sample from So that's the mu for the xbar population Okay Now xbar itself is the sample mean but mu is a population
- 19:30 - 20:00 mean for that sample and that is either equal to 128 um under a Z or it's not equal So we're just doing the two-sided example in this uh the two-sided uh hypothesis in this example And then here's the text version And again notice the word sample does not appear The word significant does not appear in the
- 20:00 - 20:30 hypothesis So you have the hypothesis before you can think of it as happening even before you even measure the data Usually that's not necessarily the case but they exist a priority All right you don't have to do any measurement to to have the hypothesis And so this was an observational study They went through medical records the retrospective
- 20:30 - 21:00 study They collected the uh systolic blood pressure me measurements for these 72 executives Now we're going to convert this data into a Zcore and this will allow us to perform a Z test We're going to learn all about Z tests in lecture 7 but we'll just give a quick example of how this works You already know how to calculate the
- 21:00 - 21:30 zcore So we did this in chapter four when we're doing confidence intervals So what is the formula for Z joseph
- 21:30 - 22:00 what's the formula for Z okay And in this case we're not going to use X but we're going to use yes because we have a sample mean And when we have the sample mean the standard deviation is not just sigma but it's huh Um no we've got we're given sigma so
- 22:00 - 22:30 we're not going to use this sample standard deviation But remember for the sampling mean that the standard deviation you divide by the square root of n So this is our zcore that we're going to calculate We'll look at this again in lecture seven Um so don't worry too much right now What we're wanting to see is that process where we take data from the sample We calculate the sample mean and then we're going to calculate a test
- 22:30 - 23:00 statistic in order to get a p value Remember it goes data probability model which gives you the test statistic Then you get to comput So this is where we're going We're at this step here We take the data and go to the test statistic and then we're going to
- 23:00 - 23:30 get all right So what is our zcore in this case oh we plug it in What's our end huh
- 23:30 - 24:00 you got to remember from the slide how many executives were there yep What' you say 72 72 But yeah that's that's right That's the that's the number Looking for that number So this is how we're going to calculate that Zcore Then we're going to have our Z
- 24:00 - 24:30 And then what's this um what can we do with this ZV valueue we'll call this ZXAR Let's say ZXAR and it's going to be negative So we'll say going to be a ZXAR What what can we do to say what the probability of getting this is but we can say what the probability of
- 24:30 - 25:00 getting less than that is or greater than that on the other side Okay So so that's what we're going to do We're going to figure out those areas and that's going to be our p value So let's look Okay we need to share the screen again
- 25:00 - 25:30 All right So why can we use the Z distribution because we know sigma That's right Okay So again we're just trying to illustrate the p value concept here Now we've already talked about normality assessment in the um confidence interval lecture We're
- 25:30 - 26:00 going to come to it again when we do um testing So we'll cover this in detail a little later Right now we're going to assume we pass our our normality assessment Okay and that means we can use a method based on the normal distribution So we got 72 executives We've are converting the data to a zcore This is a z test It's any test is a
- 26:00 - 26:30 method for computing the so this is a little quiz Huh any statistical test is a particular method for computing the p value Okay All right And then if the p value is less than alpha we are going
- 26:30 - 27:00 to the p value is less than alpha we reject the null hypothesis Correct Correct Okay Okay And this works for any statistical test So please remember that slide That's why it's so tiny and hard to read okay because it's really not important It'll only be on every
- 27:00 - 27:30 question on every homework and every exam from lecture seven on Okay So here we got our calculation and we see that this is going to be min -1.09 is our zcore for this sample mean So this is the test statistic for this test z=
- 27:30 - 28:00 -1.09 That's going to allow us to use the probability model to calculate the p value So how does that work okay that's our null hypothesis So how likely is it that we would get this value if h0 is true so what we want to do is actually see the probability of getting this value or something more extreme Okay because it cuz H0 says the means are
- 28:00 - 28:30 equal and if we get a sample that's different than the mean that's going to push us away from that So we want to interest in the probability of getting something this far away or more Okay So that's how we're going to get the p value and it flashes fortunately Okay So um here is minus 1.09 That's the graph I
- 28:30 - 29:00 drew over there And this is the area to the left It's given by the CDF norm CDF This is the cumulative graph of all the probability to the left As you go to any value is one up the limit is uh C goes to infinity It's at zero you go all the way to the left That's called a sigmoid curve by the way That shape And it turns out the norm CDF for
- 29:00 - 29:30 this is 1379 That's how much area is to the left Then that's the probability that we will get minus 1.09 or less if if the null hypothesis is true And then when this is a two-sided test because we have an equal sign we've got to double that So we got to get for the other side
- 29:30 - 30:00 the other tail as well That's why it's called two-sided because we are just looking for a difference So we're interested in any probability that's that extreme or more So it would be on either side We add the amount in the other tail and it's symmetric So it's always going to be equal So what happens is we end up doubling it And the p value for this example is 2758 That's the
- 30:00 - 30:30 probability of getting a zcore of 1.09 negative or positive or more extreme Okay Now that is our p value That's what we're always get trying to get to in a test But once we have the p value we have to know how to interpret it So it's a simple rule We've said it before in
- 30:30 - 31:00 the slide with the tiny print It was so large it went off the slide What is the rule that's right So what is alpha typically what have we been using 0.05 So we compare the p value always at 0.05 If it's less we reject Is this p
- 31:00 - 31:30 value less than 0.05 no So we are not going to reject There's a 27 28% chance of getting this value if the null hypothesis is true That's not low enough for us to reject the null So this is what we do This is how we interpret it 28% chance This is not unlikely if we use a significance level of 0.05
- 31:30 - 32:00 But we reject or support depending on the value we choose for alpha You got it all right That's why it's called level of significance because we go below that we say it's significant It's a threshold If it's above that we say it's not significant But we choose where that level is That's how this works It's a betting strategy Alpha is a betting
- 32:00 - 32:30 strategy You're you you you don't know what the true value the true you don't know whether H0 is true You're going to make a bet based on the data That's what the p value is And that's what this is what question the alpha answers Alpha answers this question All right How small must the p value be to be statistically significant
- 32:30 - 33:00 that's exact that's what it's for That's his whole res on detra French The reason to me I think that's what that means in French This is the purpose for existing is so that we can answer this question is look at our p value and say hey this p value is above alpha this p value is below alpha Now reminder that we used alpha before and this is how it's related to confidence intervals Okay But it's real kind of importance is
- 33:00 - 33:30 in this process of determining statistical significance and we have an area under the curve that's defined by alpha So in this case with a two-sided example we would have alpha over two in the left alpha over two in the right If we get a p value out here in these critical areas then we're going to reject But if it's not if our
- 33:30 - 34:00 sorry if our test statistic falls out here or out here then we reject But if our test statistic is inside then we will not reject And then so we say we choose to believe okay we can't prove it because we never can know what the real population is unless we measure the whole population usually impractical and in
- 34:00 - 34:30 some cases impossible Um so the observed differences we we we decide to believe that the observed differences are due to chance They're random variation It's not a true difference between the groups So we either say there is a statistically significant difference This is in the conclusion not
- 34:30 - 35:00 in the hypothesis or we say there is not a statistically significant difference So these are what you have to do You have your p value This once you get it you you perform the test to get the p value You interpret the test afterwards by comparing it to alpha and then you have to express it in competent language We'll we'll see that in the
- 35:00 - 35:30 competency slides And so here's the competent language You put in the appropriate things into the template but this is for the conclusion for the interpretation not for the hypothesis Okay here it goes Do not mention samples in hypothesis
- 35:30 - 36:00 or so So here in this instance we got the p value of 28 we would conclude no statistically significant difference in the executive systolic blood pressure uh in that of the general population at the 0.05 level of significance we decide to consider this
- 36:00 - 36:30 difference uh to be due to random variation Okay So we have talked about this one tailed or two-tailed and this is example of different We had an alternative hypothesis where we said the mu of the executives is different not equal to the 128 But we could have perhaps tried a
- 36:30 - 37:00 hypothesis that said that the mean is greater than 128 or the mean is less than 128 All right So those are one-sided We're just going to go with one direction In that case we don't double the um the p value See if we're saying that it's left we just need that and it's called also called a left tailed test So one tailed
- 37:00 - 37:30 or left tailed We could have a right tail test if we're if we're uh the alternative hypothesis is looking at a at a greater than on the increase And you do have to pay attention to which it is when you're calculating the p value For instance you've got to use the area outside and norm CDF will give it to you
- 37:30 - 38:00 if you have a negative value But if you have a positive value you have to do one minus to get the area on the right When you have a two-sided test you just have to double the value but you have to be careful which value you double Depends on what your Z is You want to make sure that you double a value that is less than 0.5
- 38:00 - 38:30 You cannot have a p value that is greater than one Okay If you have you do one minus this then it will be a big number like n or something then you end up with a p value of 1.8 That's not possible Probability can never be greater than one Okay Let's come back to this We'll
- 38:30 - 39:00 come back to this later We'll do do some examples later on on one tailed and two-tailed hypothesis Okay Yeah Let me just we'll do this next class I want to get to um covered this So we haven't seen this pretty graphic yet
- 39:00 - 39:30 E value less than alpha project H0 Tried so many ways to get students to remember this Most important thing here is the less than and the reject This is what students will get flipped around So they'll say P be greater than alpha reject
- 39:30 - 40:00 No And if you think about it you want to reject H0 when it's not likely The probability is low So you'll remember it's got to be less than the reject I tried so many ways If you memorize this if you say it p value less than alpha reject zero If you say it like 10 times you know a few times a day Doesn't take long to say that 10 times You do it 10 times in a day 10 times then you say it a 100
- 40:00 - 40:30 times I used to smoke cigarettes Takes five minutes to smoke cigarette And I would smoke 20 or sometimes 40 cigarettes a day That's like 100 200 minutes a day It's destroying my lungs I'm glad I don't do that anymore Um very easy to do something like this 10 or 20 times a day Just say it over 10 times Get it in your head Then you will never forget it It's it's just so important to anything you're going to do
- 40:30 - 41:00 from here on out as an engineer Any paper you read any study you do where you're analyzing data Now how do you use the p value p value less than alpha reject H0 Okay All right So now we need to talk about what can go wrong with this process And when I say what can go wrong I mean
- 41:00 - 41:30 simply anyone ever been to the casino been to Vegas did you go go to one of the casinos there yeah So I don't like casinos because I know the odds but some people enjoy the atmosphere you know and the
- 41:30 - 42:00 excitement So I guess it's fine I mean clearly a lot of people enjoy it but um on a good day you win You make bets and then your bets are right On a bad day not so much You might run out of money real quickly You might not want to give up and you might borrow some money and then pretty soon you're in bad shape
- 42:00 - 42:30 Hopefully that that doesn't happen Oh it definitely happens I just hope it doesn't happen to you Um so we are making a bet on whether to believe one of two
- 42:30 - 43:00 things All right And this is similar to saying HA is true These are two things that we can go with Only one of them can be true on a good day What's going to happen we're going to use probability to decide just like you might if you were a
- 43:00 - 43:30 really good crabs player a really good blackjack player You know the probabilities You make the best bet with those probabilities Are you guaranteed to win no But you got the best possible chance of winning if you if you if you use the probabilities Now in this case how did we decide let's say what what are our
- 43:30 - 44:00 two these are the two possibilities This is uh we'll call it the population world or some people call it the ground truth It's reality It's what really is the case But we don't have direct access to it We have uncertain information So we have to
- 44:00 - 44:30 say we have to make a choice Can call that a belief or a decision This is a concrete act What are the possible decisions we can make on what to believe we reject
- 44:30 - 45:00 H0 We do not reject H0 Those are the two possibilities So this is like your bet down here This is what actually happens up here So if you decide to reject H0 are you guaranteed to be correct no If you decide not to reject H0 are you guaranteed to be
- 45:00 - 45:30 correct no So this is how mathematicians analyze this There are two possible reality states and there are two possible decisions So we put it in a 2x two grid We have reality here and we have belief here
- 45:30 - 46:00 Okay So if a Z is
- 46:00 - 46:30 true and we reject it that's this top left box What what is that h0 is true That's the reality But we look at our p value and we decide to reject H0 That's our bet Win or lose yes that's an
- 46:30 - 47:00 error H0 is true Do not reject What is that so H0 is true That's the reality We we decide based on our data do not reject What happened did we win or lose yeah that's
- 47:00 - 47:30 correct Okay Now if the alternative is true that's reality And we reject H0 Win or lose That's correct when h a is true we want to reject a z then then we'll get to the right conclusion but over here if h a is true and we do not reject then that's another error the
- 47:30 - 48:00 important thing here is that there are two kinds of errors you can make these are not the same kind of error one is when you believe you reject zero you believe there's a when there's not So you made an error You believe there's a difference when there's not
- 48:00 - 48:30 That's called a type one error Now you need to know you need to remember this and and we'll learn some things about why down here you believe there's not a
- 48:30 - 49:00 difference But there really is the alternative hypothesis is true In reality there is a difference But you didn't see you didn't uh conclude that based on your error This is called a type two error Now this simple grid and the reasoning behind it are something I hope you will practice You could if you smoke
- 49:00 - 49:30 cigarettes you could do this on a napkin while you're smoking a cigarette you know for practice If you don't smoke cigarettes maybe you drink coffee or you know I don't know go for a walk in a park you sit on the bench for a few minutes sketch this on a napkin then check it and see if you got it right What is the probability of getting a type one error this you could actually reason Is it
- 49:30 - 50:00 25% 50% you going to be wrong 50% of the time So think about it Type one error means H0 is true but you rejected H0 which means you got a p value that was huh the p value was what
- 50:00 - 50:30 yes Less than alpha That's the slide I want you to learn Say that slide 10 times a day 10 times 10 x 10 every day till you get the less than sign So we we said p value less than alpha When h0 is really true what's the probability that that it could be less than alpha 50 The probability is exactly equal to
- 50:30 - 51:00 alpha Okay because if a z is true that's that's how we define the the alpha is a probab you know that's a p value of 0.05 is where alpha is a probability So this error type one error is always equal to alpha probability And so so in that case the the chance of getting it correct if H0 is true is one minus
- 51:00 - 51:30 alpha because H0 is true we're either going to reject it or not This is why this is the thing This is our betting strategy We decide how much of this Why not go to zero here why not so why don't we say have a zero chance of of having a type one error is that a good strategy that would just mean we always go here and do not reject no matter what
- 51:30 - 52:00 Is that a good strategy why not so the sample mean of the uh executives was 272.3 mm for mercury We reject 80 and conclude that there's no significant
- 52:00 - 52:30 difference between that and the population was 128 Is that a good a good idea we just say there this is a random variation P value is equal to 2.02 * 10 -23 But we just decided always to do not
- 52:30 - 53:00 reject So So this is the probability of getting this if a z is true But we're not going to reject because we're going to say alphals 0 and this is greater than zero It's not less than zero Is that a good strategy are you following me or did I lose you we're looking at analyzing the possible errors and and using that to
- 53:00 - 53:30 guide our strategy This is what an old statistics guru named R A Fiser did over 100 years ago He devel he was like the Einstein of statistics He did a lot of the tests developed the whole hypothesis testing framework that everybody uses with P values and everything Now he wasn't the only one but he's just the most famous He did
- 53:30 - 54:00 really important work So why do we why do we say we're going to accept a 0.05 we're going to we're going to accept a 5% error rate why do we say that what's what's the logic behind it do you think this is a good bet that if we get a sample and the mean in that sample is 272 you think it's good to conclude that it's no
- 54:00 - 54:30 different here we got 128 and a mean of standard deviation of 15 How many so this is so two times this is 30 This isundred and 55 So it's about 10 standard deviations away So we have a Z of like we have to divide by 72 72 But
- 54:30 - 55:00 still that would make it even larger than 10 Okay It's just it's just a really small probability of this happening So do you want to go with the H0 if that's the case yeah you want to you want to go with this but it if you don't have a chance of getting this error you can never have a chance of of getting this right Okay so this is the tradeoff You you the
- 55:00 - 55:30 these are not independent They're not the same We we we end up with something that we call beta which is the probability of a type two error And it's complex to calculate but it depends on our choice for alpha It depends on some other things and the opposite of that is 1 minus beta This is called the statistical power This is the the ability to detect a real
- 55:30 - 56:00 difference Okay Type two error is when we don't detect a real difference type one error is when we hallucinate a difference that's not there but just just by random chance we got a p value less than alpha so we reject a zero but it was really no different so this idea of statistical error can take a while to wrap your head
- 56:00 - 56:30 around but please think about it please read about it talk to AI guy about it Okay And the alpha and beta are very linked Alpha is our level of
- 56:30 - 57:00 significance and beta is related to 1 minus beta power Do we have statistical significance and then we have statistical
- 57:00 - 57:30 power These concepts are linked and are very important to power is the ability to detect Real difference on that detect
- 57:30 - 58:00 All right So these slides are going
- 58:00 - 58:30 to revisit what we've already covered Important Okay And this is something I didn't say but it's a useful thing to kind of plug into your memory that when we reject H0 when it's actually true it's it's like a false
- 58:30 - 59:00 positive Let's say you get an unusual uh level on your exam uh on your on a blood test that says you have COVID for instance or you have the flu but you really don't That's called a false positive The test says you're positive but you're really not That's what's happening when you make a type one error It's like you're saying "Oh there is a difference here The sample mean you know gives us
- 59:00 - 59:30 this p value It's so low we reject a zero." So we conclude there is a difference but we're wrong That's a false positive That's what type one is And it's always equal to alpha the probability that is going to have that error Now when we have a false negative like you take a test you get a negative result says you do not have hepatitis but the test is wrong You
- 59:30 - 60:00 actually do have it That's a false negative And that's what's happening with the type two error We're failing to detect something that's real a diff an effect or a difference that's real Okay and we call that that probability beta We choose alpha but we don't choose beta Beta comes out of the the way it works Now this is very similar to what I did except it has the
- 60:00 - 60:30 reality on the top and the research on the side It really doesn't matter as long as you know which is um correct and and what type one and type two represent Okay You can use smiley faces and frowny faces if you want That's pretty much the same information
- 60:30 - 61:00 in our table just a slightly different configuration So a lot of times in biomed engineering if you were doing a study like for instance to test a drug and you might be want to know does the drug have a benefit and you have the H0 there's the drug has no effect or you know the alternative hypothesis is that it has a
- 61:00 - 61:30 benefit Well if you reject H0 when it's actually true then you're going to be thinking here's a drug that that that improves blood pressure for instance when it really just has a random variation it doesn't really have any real effect Now on the other hand if you have a blood pressure that works blood pressure medication that
- 61:30 - 62:00 works and then you fail to not you failed to detect that u improvement on your test then you will not implement something that doesn't that does have a benefit So again the power is uh something that can be calculated on the basis of a number of things but
- 62:00 - 62:30 um in general I just want you to know what it is We're not going to do a lot with power in this course other than te you're going to be tested on knowing what it is and how it relates to the types of difference You should know it's the uh related to the probability of a type two error one minus beta Now it can be calculated alpha can be involved in the calculation Don't get
- 62:30 - 63:00 confused by that This is the definition It's related to the probability of type two error One minus the probability of type two error is the power Now beta is not the power One minus beta is the power Important to know Okay And let's see what else we've got today
- 63:00 - 63:30 Okay we're going to do the normality assessment thing Okay so the key thing I'll go ahead and post these slides but we'll we'll go ahead and stop early today um the um in all likelihood Okay So so these slides will
- 63:30 - 64:00 be um needed for you to work homework six but homework six is going to be an online quiz and you'll need to study these and then you'll have 30 minutes to take the quiz I'll post it after we finish We'll finish this on Monday Um and um the other thing that that I hope to do next week is on Wednesday get us to the lab to do the uh Tylenol lab but I got
- 64:00 - 64:30 to work with Alex on that So we'll see how that goes I'll have more for you about that on Monday And so we'll finish this up next time One of the things that is in the remainder of the slides is understanding when it's appropriate to use uh methods based on the normal distribution because we're going to be
- 64:30 - 65:00 doing statistical tests And for lectures 7 through 9 all of the the tests are going to be based on the normal distribution Lecture 10 we'll study a type of test called a nonparametric test And this is something you do when you can't do one of the normal distribution methods Usually that's because you fail the normality assessment So we will um be talking about this over and over
- 65:00 - 65:30 for the remainder of the semester Any questions homework five due when is that huh saturday Yes Um homework four grades will be posted very soon We are going to have to do an exam that's going to cover lectures three and four and we'll probably do that on
- 65:30 - 66:00 either the 31st of March or the 2nd of April Yeah you can't schedule it until I decide Yeah So please please wait Be please be patient There'll be plenty of time to get it scheduled Okay All righty