1. Home
  2. Explore
  3. Statistics
  4. Hypothesis Testing: Randomization Tests

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Hypothesis Testing: Randomization Tests

Transcript

Welcome to the full video lecture on hypothesis testing part 2. This video covers the content from sections 4.4 and 4.5 of the Lock^5 textbook. Last week you learned how to conduct a hypothesis test using randomization procedures in stat key and Minitab Express. this week we're going to delve a bit deeper into hypothesis testing. first let's review what you learned last week. You learned how to use a five-step procedure to

conduct a randomization test in step one you determine the correct test and write your hypotheses remember that the hypotheses are always written in terms of population parameters and the null hypothesis always contains the Equality in step two you construct a randomization distribution given that the null hypothesis is true you learned how to do this in both stat key and Minitab Express last week step 3 use the randomization distribution to

find the p-value the p-value is going to be the area on that randomization distribution that is more extreme than your observed sample statistic in the direction of the alternative hypothesis step 4 make a decision this is where you compare your p-value to your alpha level if P is less than or equal to alpha you reject the null hypothesis if P is greater than alpha you fail to reject the null hypothesis this week we'll learn more about also levels in the last

lesson you saw that the standard alpha level is 0.05 unless you have a reason to use a different alpha level you assume that alpha equals 0.05 in step 5 you state a real-world conclusion go back to your original research question and answer that question with the sentence or tail now let's look at the new content that we're going to see this week these are the learning objectives that will be covered in this video we'll

identify type 1 and type 2 errors select an appropriate significance level for a given scenario explain the problems associated with conducting multiple tests interpret the results of a hypothesis test in terms of practical significance identify factors related to the statistical power of a test and we'll compare and contrast confidence intervals and hypothesis tests these video lectures can get a bit long I recommend that you take breaks between

some of these learning objectives to review the textbook or online notes if you're viewing this video on YouTube in the description you can find timestamps that will let you jump to a specific learning objective so if there's a topic that you need to review you can use those to jump ahead let's start now with the first learning objective identify type 1 and type 2 errors this is a table that's often used when communicating what a type 1 and type 2 error are in the rows we have the decision that you make when you go through that five-step hypothesis testing procedure in step 4 you can reject or fail to reject the null hypothesis recall if P is less than or equal to your alpha level you reject the null hypothesis if P is greater than your alpha level you fail to reject the null hypothesis so the rows are going to be determined by your decision when you're conducting a hypothesis test the columns then refer to the reality this

is where it can get a bit confusing because in real life we only have sample data we don't have the population data so in most cases we don't know if our decision is correct or incorrect this is primarily hypothetical when we reject the null hypothesis there are two possibilities either we made a correct decision and the null hypothesis is really false or we made a type 1 error this is also known as an alpha error analysis error occurs will reject the

null hypothesis when in reality the null hypothesis is really true when we fail to reject the null hypothesis there are also two possibilities if the null hypothesis is really true then we made a correct decision if the null hypothesis is really false so if there is a difference in the population but we fail to reject it then we made a type 2 error this is also known as a beta error let's look at a couple examples a single sample mean

test is conducted to determine if the mean number of cookies per pack is less than 25 the randomization test resulted in a p-value of 0.14 but in reality mu equals 24 to review we can use this scenario to write our hypotheses so our null hypothesis is that mu equals 25 the alternative hypothesis is that mu is less than 25 because we want to know if in the population the mean number of cookies per pack is less than 25 a randomization test was conducted for a

single sample mean and we have a p-value of 0.14 because our p-value is greater than the standard alpha level of 0.05 we fail to reject the null hypothesis however we're told that in reality mu equals 24 so in reality the null hypothesis is really false in this case we made a type 2 error let's look at one more example is there a relationship between age and height in the population of all Penn State students a randomization test for correlation

resulted in a p-value of 0.04 4 but a later census show that there is not a relationship in this here we have our hypotheses the null hypothesis is that Rho or the population correlation equals zero the alternative hypothesis is that Rho does not equal zero our p-value was less than the standard alpha level of 0.05 so we rejected the null hypothesis however there was later a census a census is when data are collected from a whole

population and that census showed us that there is not a relationship in this population so really Rho equals zero and the null hypothesis is true in this case we made a type 1 error our second learning objective is to select an appropriate significance level for a given scenario the significance level is also known as the alpha level this is the highest p-value for which we would reject the null hypothesis the standard alpha level

is 0.05 there are times when it may be appropriate to use a larger or smaller alpha level for example pilot studies often use larger alpha levels a pilot study is a smaller study that's performed before a larger study and often uses a higher alpha level because the purpose of a pilot study is to gain information about the data that will be collected in the later larger study the sample sizes are typically small and the results of a pilot study are typically

not used to make important decisions pilot studies are usually run just to gain information for a later larger study so in those cases it's not uncommon to see an alpha level of 0.1 0 or even 0.15 smaller alpha levels are used when the consequences of a type 1 error are more serious for example in medical research studies we're making a type 1 error could mean giving patients ineffective treatment a smaller alpha level for example 0.01

or even 0.001 may be used lower in the alpha level means that a smaller p-value is needed in order to reject the null hypothesis this makes it more difficult to reject the null hypothesis but it also reduces the probability of committing a type 1 error the third learning objective is to explain the problems associated with conducting multiple tests if we are conducting a hypothesis test with an alpha level of 0.05 then we are

accepting a 5% chance of making a type 1 error given that the null hypothesis is true approximately 5 out of 100 tests would be statistically significant due to a type 1 error here each of these circles represents a hypothesis test where the null hypothesis is true given an alpha level of 0.05 approximately 5 out of 100 would be statistically significant when in reality there's no difference in the population so when we say given that the null hypothesis is

true that means that there is no difference in the population but we would find statistically significant results dunamis type 1 error so due to random sampling variation 5 out of 100 would be statistically significant and those would be type 1 errors this leads to the related issue of publication bias publication bias occurs when only results that are statistically significant are published research studies with statistically significant results are much more likely to be published than studies without statistically significant results this means that of these 100 studies that were performed the 5 that found statistically significant results would be published but the 95 that did not find statistically significant results would not be published so only the studies in which there was a type 1 error in this particular example would be published that's when

you're performing a review of literature you would only read about the studies with the statistically significant results you would not be able to find the studies that did not have statistically significant results because they would either not be published or they would be published by the author maybe on their own personal website or presented at a conference someplace where it's more difficult to find those results going back to the issue of problems with multiple testing if you are conducting multiple tests on the same data you can adjust your alpha level to take into account the number of tests that you're conducting this is beyond the textbook in this lesson although the LOC five textbook does cover some of these issues later in the analysis of variants chapter an easy correction for conducting multiple tests is the bonferroni method this is when you divide the alpha level by the number

of tests being conducted here's a quick example if you're doing a total of 6 tests with an overall alpha level of 0.05 instead of comparing all six of your p-values to 0.05 you would compare each p-value to 0.05 divided by 6 which is 0.0083 3 so for example if you were conducting 6 pairwise means tests instead of doing all six of them independently because you're doing them on the scene data and maybe using the same variables you would do those 6

tests and have a a test wise alpha level of 0.05 and we'll see more of this later in the course when we cover analysis of variants and we'll look at some other methods for this but for this lesson just be aware of the bond Ferranti method because mathematically it's the easiest one to do you just divide your alpha level by the number of tests that you're being conducted and then you compare your p-value to that adjusted alpha level the fourth learning

objective interpret the results of a hypothesis test in terms of practical C if your p-value is less than or equal to your alpha level the results are said to be statistically significant but remember the statistical significance is impacted by sample size with a very large sample size even a small difference may be statistically significant this is why it's important to look at practical significance in addition to statistical significance practical significance refers to the meaningfulness of the observed difference this is also known as the effect size so now we're not looking at the sampling distribution of the p-value now we're looking at in our sample how different are the two groups that we're working with or if we only have one group how different is this one group from the hypothesized value there are a few different ways to measure effect size your online notes covers Cohen's D

this is used when you have two independent samples it's equal to the difference between the two sample means divided by the pooled standard deviation if you're doing a 1 sample mean you could just look at the observed sample mean divided by the standard deviation for that one group it gives you a measure of how different these two numbers are in standard deviation units and this should look familiar to you because it's very similar to the formula that you saw a few weeks ago for a z-score this is also in your online notes this week these are the common interpretations of Cohen's D so if D is between 0 and 0.2 we would say that there's little or no effect between 0.2 and 0.5 a small effect size 0.5 to 0.8 a medium effect size and anything greater than 0.8 we would say is a large effect size if you're working with two independent proportions later in the course you'll see that you can compute

relative risk this is the risk in Group 1 divided by the risk in group 2 we call risk is just the proportion so it's a way of comparing the proportions in two different group for correlation or regression you would use R squared which is also known as the coefficient of determination and we'll learn more about this in the later lesson when we cover simple linear regression and correlation again to summarize statistical significance addresses the question is there some difference in the population so statistical significance is an inferential question we're using data from a sample to make an inference about the population given what we see in our sample is there evidence of some difference in the population practical significance on the other hand addresses the question how large is the difference we're looking at the magnitude of the difference and we're answering a more

subjective question of is this difference meaningful in real life our fifth learning objective identify factors related to the statistical power of a test for this learning objective I recommend that you play around with stat key a little bit adjust some different factors and run the same test over and over again see how that sampling distribution changes and see how the p-value changes in statistics power is the probability

of rejecting the null hypothesis when the null hypothesis is really false so you're making a correct decision if we think back to the table that we saw when we learned about type 1 and type 2 errors remember a type 2 error was a beta error power can also be written as 1 minus beta because we're saying given that the null hypothesis is really false the probability of rejecting it in terms of how power relates to different parts of a hypothesis test as the sample size

increases recall from a few lessons ago when the sample size increases the standard error decreases when this happens statistical power is increasing when the standard error increases power decreases when the difference in samples increases or if you're doing a a one sample test when the difference between your sample and the hypothesized value increases power increases and when you increase the alpha level power increases in the last learning objective this week compare and contrast confidence

intervals and hypothesis test this brings together what we did last week with what we did two weeks ago confidence intervals in hypothesis testing are both inferential procedures in both cases you have a population you're collecting data from a subset of that population known as the sample and you're using that to make an inference about the population both confidence intervals and hypothesis testing do this they just do it in slightly different

ways they can both be conducted using resampling procedures we learned how to construct a confidence interval using bootstrapping methods and we learned how to conduct a hypothesis test using randomization procedures both of these can be done in stat key the primary difference between the bootstrapping your randomization procedure is that when we do the randomization procedure we have a hypothesis to start with the sampling distribution randomization is

going to be centered on that value in the null hypothesis when we used bootstrapping methods we didn't have a hypothesized value all we had were sample data so the sampling distribution when bootstrapping is centered on the observed sample statistic the last thing I want to point out is that a 95% confidence interval is approximately equivalent to a two-tailed hypothesis test with a 0.05 alpha level when I say approximately equal to because we'll see

later when we looking at formulas for proportions they're not going to be exactly equivalent particularly if your proportion is approaching 0 or 1 but note that in general the results that you would find by doing an five percent confidence interval would be very similar to those that you would find doing a two-tailed hypothesis test at 0.05 alpha level those are all of the learning objectives that are covered in this lesson as always if you have any questions when you're working through the online notes the textbook the homework the lab assignment you should post them to the appropriate discussion board on canvas

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent