yego.me
💡 Stop wasting time. Read Youtube instead of watch. Download Chrome Extension

Estimating a P-value from a simulation | AP Statistics | Khan Academy


3m read
·Nov 11, 2024

So we have a question here on p-values. It says Evie read an article that said six percent of teenagers were vegetarians, but she thinks it's higher for students at her school. To test her theory, Evie took a random sample of 25 students at her school, and 20 percent of them were vegetarians.

So just from this first paragraph, some interesting things are being said. It's saying that the true population proportion, if we believe this article of teenagers that are vegetarian, we could say that is six percent. Now for her school, there is a null hypothesis that the proportion of students at her school that are vegetarian. So this is at her school that the true proportion—the null would be it's just the same as the proportion of teenagers as a whole. So that would be the null hypothesis.

You can see that she's generating an alternative hypothesis, but she thinks it's higher for students at her large school. So her alternative hypothesis would be the proportion—the true population parameter for her school is greater than six percent.

To see whether or not you could reject the null hypothesis, you take a sample, and that's exactly what Evie did. She took a random sample of 25 students, and you calculate the sample proportion. Then you figure out what is the probability of getting a sample proportion this high or greater. If it's lower than a threshold, then you will reject your null hypothesis. That probability we call the p-value.

The p-value is equal to the probability that your sample proportion—and she's doing this for students at her school—is going to be greater than or equal to 20 if you assumed that your null hypothesis was true. So if you assumed that the true proportion at your school was six percent vegetarians, but you took a sample of 25 students where you got 20, what is the probability of getting 20 or greater for a sample of 25?

Now, there are many ways to approach it, but it looks like she is using a simulation to see how likely a sample like this was to happen by random chance alone. Evie performed a simulation; she simulated 40 samples of n equals 25 students from a large population where six percent of the students were vegetarian. She recorded the proportion of vegetarians in each sample.

Here are the sample proportions from her 40 samples. So what she's doing here with the simulation, this is an approximation of the sampling distribution of the sample proportions if you were to assume that your null hypothesis is true. It says below that Evie wants to test her null hypothesis, which is that the true proportion at her school is six percent versus the alternative hypothesis that the true proportion at her school is greater than six percent, where p is the true proportion of students who are vegetarian at her school.

Then they ask us, based on these simulated results, what is the approximate p-value of the test? They say the sample result—the sample proportion here was 20. We saw that right over here. If we assume that this is a reasonably good approximation of our sampling distribution of our sample proportions, there's 40 data points here.

How many of these samples do we get a sample proportion that is greater than or equal to twenty percent? Well, you can see this is twenty percent right over here, twenty hundredths, and so you see we have three right over here that meet this constraint. That is 3 out of 40.

So if we think this is a reasonably good approximation, we would say that our p-value is going to be approximately 3 out of 40. That, if the true population proportion for the school were six percent, if the null hypothesis were true, then approximately three out of every 40 times you would expect to get a sample with 20 or larger being vegetarians.

So three fortieths is what? Let's see if I multiply both the numerator and the denominator by two and a half. This is approximately equal to—I say two and a half because to go from forty to a hundred, and then two and a half times three would be 7.5. So I would say this is approximately 7.5 percent.

This is actually a multiple-choice question, and if we scroll down, we do indeed see approximately 7.5 percent right over there.

More Articles

View All
Our Prayers Are With You, Boo | Wicked Tuna: Outer Banks
[Music] All right, man, we’ll give a prayer this morning. Everybody needs it, and we’re going to do it. Lord, we’ll come for you this morning headed out here to the east. I want to thank you for that sunshine. Well, we’re looking at our morning star, th…
Avoid THESE Poor Habits Before You Burn Out | Rachel Hollis Interview
Think it really is a way to set your, you know, the last quarter of your life in a way that you really enjoy it. I drove myself into the ground with bad diet, bad sleep, bad habits of every kind. What the [ __ ] was I thinking? So, I guess let’s start wi…
The Contradiction In The U.S. Constitution
Did you know that one of the greatest mathematicians of the 20th century discovered a logical contradiction in the US Constitution that, if found, could be used to legally change America’s democracy into a dictatorship? Well, he did, but we no longer kno…
How Small Is An Atom? Spoiler: Very Small.
Atoms are ridiculous and unbelievably small. A single human hair is about as thick as 500,000 carbon atoms stacked over each other. Look at your fist; it contains trillions and trillions of atoms. If one atom in it were about as big as a marble, how big w…
15 Signs You are the New Poor
The World Economic Forum said, and this is a direct quote: “By 2030, you will own nothing and you’ll be happy.” There’s a new breed of poor people out there, some by societal design, some by choice. They don’t look poor on the surface, but they are cursed…
Daily Conversation to Learn English for Beginners | Practice English Speaking and Listening
Excuse me, do you have a bigger frying pan? Salesperson: Of course. We have many sizes. How big do you need? Customer: Well, my current one is too small. I need something larger. Maybe around 30cm. Salesperson: I see. We have this one here—it’s 32 cm. Per…