## Day 36: The uniform pdf

Pick a number between 1 and 10, do you have one? Good, now what are the odds that you chose one number over another? That is the idea behind the uniform distribution. It distributes the likelihood of an event occurring equally over all the possible outcomes. So in our number picking game, the likelihood of you choosing 1 is just the same as the likelihood that you would choose the number 10. Silly? Well, maybe, but there are practical uses for the distribution although not many we use day to day (unless you are really into picking a random number from a range of numbers).

Now, let’s look at the math behind the uniform distribution and see exactly what we are dealing with shall we? Our friend the uniform distribution looks like this guy:

Fun right?

Okay well, maybe, really it just says exactly what we just stated for a range of values between a and b (in our case above we used 1 and 10), the probability is equal across the entire range. We won’t derive the CDF for this one, but we can look at the result and in that case the CDF for the uniform distribution is going to be this guy:

In this case, x > b is 1, this should make sense… does it? Well for x > b we said that every event between a and b occurred or will occur. Basically when x > b we are saying that if you are asked to pick a number between 1 and 10, what are the odds that you actually picked a number between 1 and 10, which should be 100% (if you are good at following directions). The plot of the CDF doesn’t hold too many surprises and it looks like this:

Yep, a nice straight line from a to b and zero for when x < a and 1 for x > b. Nothing too fancy, certainly not as hard to work with as the gaussian! Unfortunately there aren’t too many uses for this distribution that I could come up with.

What are the odds that a specific spot on a tire will be punctured? What is the length of time you will have to wait for the train? Things like these are uniformly distributed, but hardly helpful. That isn’t to say that it is never used, just that when it is used the outcome doesn’t matter. Or put more scholarly, the likelihood of one outcome is equal to the the likelihood of every other outcome. Which is also why I really just like remembering it by saying nothing really matters.

So that’s it, that’s the post. Next time we can talk something more… useful? No, that’s mean to say about the uniform distribution (still true though)! In any case, we can go over something fun I’m sure. You’ll just have to wait and see topic we cover when the new post comes out.

Until next time, don’t stop learning!

*My dear readers, please remember that I make no claim to the accuracy of this information; some of it *might* be wrong. I’m learning, which is why I’m writing these posts and if you’re reading this then I am assuming you are trying to learn too. My plea to you is this, if you see something that is not correct, or if you want to expand on something, do it. Let’s learn together!!

## But enough about us, what about you?