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

Density Curves | Modeling data distributions | AP Statistics | Khan Academy


6m read
·Nov 11, 2024

What we're going to do in this video is think about how to visualize distributions of data, then to analyze those visualizations, and we will eventually get to something known as a density curve. But let's start with a simple example just to review some concepts.

Let's say I go to 16 students and I ask them to measure how many glasses of water they drink per day for the last 30 days and then to average it. And so this data point right over here tells us one student drank an average of 0.5 glasses of water per day. That person is probably very dehydrated. This person drank 8.1 glasses of water per day on average for the last 30 days; they are better hydrated.

If we want to visualize that, we can set up a frequency histogram where we can create some categories. So this first category would be for data points that are greater than or equal to zero and less than one, and we can see that two data points fall into that category. And that's why the bar right over here for that category is up to two. This category right over here is greater than or equal to three and less than four. Notice there are four data points in that category, and on this frequency histogram, the height of the bar is indeed four.

So this is a nice way of looking at a distribution, but you might be more concerned with what percentage of my data falls into each of these categories. That becomes especially interesting if we have many, many, many, many data points. And if we had, you know, 1 billion, 600 mil, 432,500 townhouse. But in that first category, instead of the bar height being two, the bar height is now 12.5%. Why is that? Because two of the 16 data points fall into this category. 2 of 16 is 1/8, which is 12.5%. In this one right over here, notice instead of the height being 4 for four data points, it's now 25%. But these are saying the same thing; four out of the 16 data points fall into this category. 4 of 16 is 1/4, which is 25%.

So both of these types of histograms are really useful, and you will see them used all of the time. But there are also cases where you have many, many, many more data points, and you want more granular categories. So what you could do is, well, let's just make our categories a little more granular. For example, instead of them being one glass of water wide, maybe you make them half a glass of water wide. So this first category could be greater than or equal to zero and less than 0.5, and that will give you a clearer picture.

I'm now assuming in a world where we have more than 16 data points; maybe we have 16 million data points. This would be percentages on the left-hand side, but maybe that isn't good enough for you. Maybe you want to get even more granular, so you make each category a quarter of a glass. But maybe that doesn't satisfy you; you want to get more and more and more granular. Well, you could imagine where this is going. You could get to a point where you're approaching an infinite number of categories, and each category is infinitely thin — super, super thin to the point that if you just connect the tops of the bars, you will actually get a curve.

And this type of curve is something that we actually use in statistics. And as promised at the beginning of the video, this is the density curve we talk about. What's valuable about a density curve is it is a visualization of a distribution where the data points can take on any value in a continuum; they're not just thrown into these coarse buckets.

So how would you interpret something like this? If you look over the entire interval from zero, let's say to nine — assuming no one drank more than an average of nine glasses per day, even in our 16 million data points — well then the area under the curve over that interval is going to be 100% or 1.0. This is going to be true for any density curve; the entire area of the curve is 100%! It represents all of the data points. A density curve will also never take on a negative value; you won't see the curve dip down and do something strange like that.

Now, with that out of the way, let's think about how we would make use of it. If I wanted to know what percentage of my data falls between two and four glasses, well I would look at that interval. I'd go from 2 to 4; I would look at this interval right over here, and I would try to figure out the area under the curve here. This area is going to be greater than or equal to zero and less than or equal to 100%. When I eyeball it right over here, it looks like it's about 40% of the entire area under the curve. So just eyeballing it, I would say roughly 40% of my data falls into this interval.

If I were to ask you what percentage of the data is greater than three, well then you would be looking at this area, and it looks like it is about 50%. But once again, I am estimating it. But you can start to see how even with estimation, a density curve could be useful in the real world. Statisticians will often have tables that might represent the information for the density curve; they might have computer programs or some type of automated tool. And there are also well-known density curves — the famous bell curve that we will study later on — where there's a lot of precise data and a lot of tools to exactly figure out the areas.

The last thing I'd like to cover is a key misconception for density curves. If I were to ask you approximately what percentage of my data is exactly three glasses of water per day, and when I say exactly, I mean exactly the number 3.00, with zeros going on and on forever — the exact number three — well, you might be tempted to just say, "Okay, this is three. Let me see the corresponding point on the curve." It looks like it is about 0.2 or a little higher than that, so maybe you would say a little bit more than 20% or approximately 20%. And what I would say to you is this is wrong.

Remember, the percentage of the data in an interval is not the height of the curve; it is the area under the curve in that interval. And if we're just talking about one precise value, like exactly the number three, there is no area under the curve. This vertical line that I just drew over the number of three has no width, and this actually makes sense in the real world. Even if you were to look at 16 million people, it is very unlikely that anyone would drink exactly three glasses of water per day. I'm talking about not one out of more or one atom less than three glasses. There might be many people between 2.9 and 3.1, but no one is exactly three glasses a day.

When someone says, "I'm drinking three glasses of water per day," that'd be a rough estimate. They're probably 3.1, or 2.99999... or 3.15 or whatever else. And so, instead, you could say what percentage falls into an interval — maybe that is greater than or equal to 2.9 and less than or equal to 3.1. And so, once you have an interval, then you actually can look at the area. So we're going to go from 2.9 to 3.1.

So now we have an interval that actually has width, and so it would be roughly the size of this yellow area that I'm shading in right over here. And we can approximate it with a rectangle even though the top of this curve isn't flat. But we could say, "Look, it's approximately like a rectangle that is 0.2 high." And what's the width? The width here, if we're going from 2.9 to 3.1, the width is going to be 0.2 wide. And so we could approximate this area by approximating this rectangle.

The area of the rectangle — 0.2 * 0.2 — that would give us an area of 0.04, or we could say approximately 4% of the data falls in this interval.

More Articles

View All
Why zero gravity is a myth: The amazing science of 'floating' astronauts | NASA's Michelle Thaller
[Music] Joshua, you asked a really great question: why is there no gravity in space? I bet you’ve seen pictures of the astronauts up in the space station and they’re floating around as if there’s no gravity at all. This is actually a really interesting m…
The REAL cost of owning a Cirrus Vision Jet
The Cirrus Vision Jet is a really impressive aircraft… on paper. It’s got a range of 1,275 nautical miles; that’s the equivalent of Melbourne to Ali Springs, London to Greece, even New York to Dallas. It can cruise over 310 knots. It’s got state-of-the-ar…
Second derivatives (parametric functions) | Advanced derivatives | AP Calculus BC | Khan Academy
So here we have a set of parametric equations where x and y are both defined in terms of t. If you input all the possible ts that you can into these functions and then plot the corresponding x and y’s for each chord for each t, this will plot a curve in t…
It’s Over: China’s Economy Is Finally Collapsing
China’s economy is in trouble, and fears the country is quote “a ticking Time Bomb.” The debt super cycle that came from the U.S. and Europe after the 2008 financial crisis could be knocking on China’s door. They said that it is over. “What’s up, Graham?…
Big Think 2017 Top Ten: #8. Kurt Anderson on the American Tradition of Delusional Thinking
Americans have always been magical thinkers and passionate believers in the untrue. We were started by the Puritans in New England, who wanted to create, and did create, a Christian utopia and theocracy as they waited for the eminent second coming of Chri…
Decimal multiplication place value
This is an exercise from Khan Academy. It tells us that the product 75 times 61 is equal to 4575. Use the previous fact to evaluate as a decimal this right over here: 7.5 times 0.061. Pause this video and see if you can have a go at it. All right, now le…