Since I'm chaotic neutral, this might sound surprising, but I hate surprises. And tonight, we've got new people coming to join our brand new campaign outside the Forgotten Realms, hunting the vampire dreadlord, Strad Vonzerovich. Now, when I play Dungeons and Dragons with my friends, I make guesses based on what I think I know to save my cute little wood elf sorcerer, especially when I need to save him from a wraith. But now I'm on edge. I don't know if all D&D games are similar, even under strange new dungeon masters. Will they have enough sparkly dice? Will they use the right edition? Updated 5e obviously. And what are the odds everyone brought good snacks? Hi, I'm Sabrina Cruz and this is Study Hall. Real world statistics. [Music] Probability distributions describe the likelihood of various outcomes during a random process. They give us a sense of what to expect in general, but we can also use them to calculate the probabilities of specific events happening. Like to see if I can defeat this wraith who is ruining my life. An easy place to start is with the uniform distribution, which represents situations where every possible outcome is equally likely. Like say my sorcerer, whose name is Fifth, is casting a fireball spell at the wraith. I figured out how much damage I've caused by rolling 8 d6. The probability of rolling any number 1 through six is 16. That's almost 17% since each roll is equally likely. Now, let's look at one die for simplicity. There are two different roles, a five or a six that I'm willing to accept on my quest to achieve maximum damage. So, the probability that I fireball to the max is 2 * 1 over 6 or a little over 33%. So, it's possible, but my odds aren't great. Now, bear with me, rules lawyers. Let's say the die doesn't just show the numbers 1 through six, but all the decimal numbers in between as well. Now, infinite roll outcomes are possible. To calculate the probability that I cause massive damage, I shade the region of interest under the probability distribution, which includes numbers 4.5 through 6.5. That area under the probability distribution curve is the probability I'm interested in. The area of a rectangle is base time height, which is 2 * 16 here. So now we're back to that little over 33% number. In general, thinking about probabilities as areas under curves is the way to go. Take the normal distribution, which helps us use standard deviations to understand certain parts of a hole through the good old empirical rule. For instance, if we go back to adding up all eight dice, the bell curve is back. And we could shade areas under the curve to figure out the probability of causing say more than 40 HP of damage. That's great. But if we're interested in other regions beyond what the empirical rule tells us, we'll need a different approach. Like maybe I want to know how long it's going to take newcomer Gertrude to complete her turn. I want to cast more fireballs, so this stranger better be fast. Computers can typically do this work for us, but we also have these handy standard normal tables which show areas under a standard normal distribution with a zero mean and a standard deviation of one. And because the distribution is symmetric, we frequently only deal with one side. So suppose the number of minutes it takes to complete a turn follows a normal distribution with a mean of three and a standard deviation of one. We want to find the probability that Gertrude takes less than 2 minutes to complete her turn, which is about as many as I'm willing to wait before I start making snarky remarks. Now we need to translate the scenario into a standard normal one by standardizing that 2minut value. We subtract the mean and scale the standard deviation to get - 1.0. Asking about the probability of getting less than two on the original scale is equivalent to asking about the probability of getting less than -1 on the standard normal scale. Then we need to use our table to find the area under the curve to the left of1. That will be the probability we actually care about. We can look at the table and find the 1.0 along the rows in the table and the 0 or the hundreds in the zcore in the columns. At their intersection, we can see the area we're interested in 0.1587. So, there's only about a 16% chance that this next turn will be over within 2 minutes. I'm ready to fireball that Wraith, guys. Just let me add them. Now, sometimes we don't know the mean and standard deviation of the normal distribution. As usual, I brought my famous tuna casserole to game night. It's the ideal protein pack snack, but how much tuna is actually in these cans? The manufacturer claims each can is 4 ounces. But when I was opening up some of the cans, they looked a little on the underpacked side, which isn't ideal when I need stamina. Smith is counting on me. Now, we cannot collect data on every single can of tuna to ever exist. So, instead, we take what is hopefully a representative sample from the population. The true mean amount of tuna per can is an unknown population parameter. So, I calculate that same quantity on the sample data we got so that we can get a sample statistic. That's our best guess at what the truth is. However, that sample statistic will wiggle around from sample to sample because each one is different. So, it's helpful if we could get a sense for how much we expect that statistic to change if we took another sample. And that's where the sampling distribution comes in. To get to the bottom of this, I rope in two of my friends and insist we each buy a sample of 10 cans of tuna. We weigh each can and take the average of our 10 numbers. Now, we each have a mean weight of tuna and can collect them in a distribution. But with so few of us, it's hard to tell how much tuna is actually typical per can. Not good. How am I going to ensure my sorcerer survival if I am weak with hunger? But if we're able to get our whole neighborhood involved, take many more samples of 10 cans of tuna and calculate many more mean weights of tuna per can, we could add them to the distribution as well. Remember, sample means vary less than individual data points because they're already averages. And if I take random samples, they also vary randomly. That means even if some of them are higher than the true population mean, some of them will also be lower and with enough samples, they'll cancel each other out. That means that a good distribution of sample means should give me a good approximation of the population mean. And we know that we can approximate the standard error of the sample means by scaling the sample standard deviation by the square root of the sample size. That gives me a decent approximation of the mean and variance of the whole population of tuna cans. And when our sampling distribution comes from a normal population, it'll usually bring us back to a familiar shape, the normal distribution. It's stalking me. And now's fifth, too. We can use sampling distributions to get an idea of what an unknown population really looks like. But we can also use sampling distributions in another way to test if a claim or a hypothesis about an unknown population can be rejected. For example, the tuna can manufacturers have already told me what the mean is supposed to be. And maybe I don't so much care about what the real mean is. I just want to know if what they're telling me is true because chaotic neutral or not, I hate liars. One way to figure that out would be to do what I did before. If the mean of my sampling distribution was 4 oz, I could be pretty sure that they were telling the truth. But if it wasn't, maybe there'd be something fishy going on. But let's be real. In the midst of my highstakes D&D lifestyle, I don't really have the time to take hundreds of samples of thousands of can to wage a war against big tuna. Luckily, there's another way. Let's say on the tuna can website, they tell me that the mean amount of tuna per can is 4 oz and that their standard deviation is 0.35 o. Now with the sorcerer powers of my bloodline or maybe just with technology I can actually generate a hypothetical sampling distribution from those hypothetical population parameters. See the computer has powers beyond even spith. If you give it a population mean and standard deviation, it can imagine a whole normally distributed population that fits in those parameters. And then it can sample that population to create a hypothetical sampling distribution with a mean of 4 ounces and a standard deviation of 0.35. Then I can use just one real life sample to test out that hypothetical mean. And I can do it the same way we were calculating probability before by looking at the area under the curve. The mean amount of tuna in my 10 cans was 3.85 ounces. That's not four, but we know that there's some variation because I didn't look at the full production line. But is it low enough to overturn that 4 oz hypothesis? To answer that, we'll need to decide the likelihood of seeing an average value that far from the mean. In other words, how likely we'd be to get a mean of 3.85 or less if the true value was actually four. That tells us if what we observed is consistent with our hypothesis or if big tuna might be trying to pull a fast one on me and thus deserving of a fireball. One way we might decide that is to look at it on the graph. If we take our hypothetical 4 oz distribution and draw a line at 3.85, we can see that the area under the curve below that line is pretty small. It's not the whole area, not even half. So, we can tell our sample mean is at least kind of unlikely if the real mean is 4 oz. Getting one weird sample doesn't necessarily call our whole population distribution into question. Unlikely doesn't always mean impossible. To decide whether it does, we have to get a little bit more precise about just how weird our sample mean is. And to do that, we can turn back to our good old friend zcores. We start by transforming our problem into the standard normal distribution, shifting our mean to zero and using the standard deviation to turn our sample mean into a zcore. Since we're testing a hypothesis here, we often refer to this zcore as a test statistic. It tells us how many standard deviations away our observed value is from the hypothesized mean. If the absolute value is small, that means it's probably nothing to worry about. But if it's big, I might be writing a strongly worded letter to big tuna on Smith's behalf. To figure out just how small or big it is, we'll use a z table. My Z table shows me that the area under the curve to the left of my negative 1.36 Zcore is 0.0869. By the same logic we used before, that means my chance of getting a result that extreme, - 1.36 or lower, is about 9%. Which means my odds of getting a 3.85 ounce tuna can in a 4 oz world, is less than 10%. This is the probability that we would see a sample mean of 3.85 85 oz or less tuna in a can, assuming that the true value was 4 oz. This probability gets a special name. It's called a P value. P is for probability or purple worm. No, it's probability. For now, we can just think of P values like this. If it's large, that means our observed value is typical if our hypothesis is true. That doesn't give us a lot of evidence to overturn our hypothesis. However, if the p value is small, that means that our observed value is really unusual if our hypothesis is true. That might make us rethink our initial hypothesis. Like whether these tuna cans really pack as much of a protein punch or mercury munch as they're claiming. In this case, though, having a 9% chance of seeing data like ours seems pretty unlikely. So, I have reason to think that the manufacturer isn't telling the truth. I will be speaking to a manager. We're always making guesses about what we think we know. There are always more quests, more stories to tell, more taverns to visit in Water Deep. We never have the time or the patience to collect all possible information. So, we have to make do with what we have. And using samples to infer information about a larger population is the bread and butter or maybe tuna and mayo of statistics. Sometimes that means stumbling on something that seems unusual and figuring out if it actually is weird or just something that happens sometimes. If you're enjoying this series and are interested in taking the full study hall real world statistics course and earning college credit from ASU, check out gostudyhall.com or click on the button to learn more. And if you want to help us out, give this video a like, smash that subscribe button, and comment your favorite DND build. Thanks for watching. See you next time.