From the course: Machine Learning Foundations: Statistics

The uniform distribution - Python Tutorial

From the course: Machine Learning Foundations: Statistics

The uniform distribution

- [Instructor] Imagine you're invited to a birthday party, but your friend forgot to note the date. If you try to guess his birthday randomly, you'll struggle a lot. The probability of guessing his birthday equals one divided by 365 as there are 365 days in a year. So every day of the year is equally likely to be his birthday. This probability follows a uniform distribution. Uniform distribution is a form of probability distribution in which an event is equally likely to occur between a certain interval. The most famous example of uniform distribution is rolling a six-sided die. The probability of getting any number from one to six is equally likely and is equal to 1/6 or approximately 0.167. (upbeat music) (bell buzzes) Can you think of one more famous example of uniform distribution? That's right, tossing a coin. The probability of getting heads and probability of getting tails is the same and equal to 0.5. These three examples are examples of discrete uniform distribution because the probability of occurrence of the events is equally likely and falls between a finite set of values. Guessing a birthday is discrete as we have 365 possible values. The same goes for rolling a die as we have only six possible values. The other type of uniform distribution is called the continuous uniform distribution with an infinite number of equally likely events. An example could be a random number generator. Another example would be manufacturing a wheel of cheese between 500 grams and 1,000 grams. So the probability of getting a wheel between 500 and 650 grams is the same as probability of getting a wheel between 650 and 800 grams. So for continuous uniform distribution, the probability of the occurrence of the events is equally likely and falls between an infinite set of values.

Contents