[Prob&Stats] 2. Probability Distribution

jun94
jun-devpBlog
Published in
4 min readSep 9, 2019

1. Probability distribution

A probability distribution is a function that describes the likelihood of obtaining the possible values that a random variable can take on. In other words, each value of the random variable(particularly the discrete random variable) have their own probability of occurring in experiments, and the set of all pairs of value and probability is the probability distribution.

  • What can we do with the probability distribution?

A probability distribution shows the possible outcomes of a particular event as well as the statistical likelihood of each event. Suppose we know the probability distribution in advance, then we can easily figure out which value(outcomes) is most likely, chances of other occurring values.

For example, let’s say we are managing a shop. Luckily we are aware which commodity is most likely to be purchased by the help of given probability distribution of customer’s taste on commodities. Then we can easily predict which products will be sold the most and which products are not by simply looking at the probability distribution.

[2]The probability distribution is also useful in other fields such as the scenario analysis, risk evaluation.

2. Types of a probability distribution

As a random variable has two types which are ‘Discrete’ and ‘Continuous’, so does the probability distribution.

2.1 Discrete probability function

Discrete probability functions are also called as probability mass functions. These discrete distributions have a countable(even in some case it might seem infinite) number of values. The coin toss that I dealt with in the last article is an example of discrete probability distributions. Figure 1 shows the calculated probability distribution.

Figure 1. The probability distribution of 3_Coin_Toss

and figures below are sample distributions from different numbers of sampling 100, 1000, 10000, 100000 steps.

Figure 2. Sample distribution of 3_Coin_Toss

2.2 Continuous probability function

Continuous probability functions which are also called as probability density functions have an infinite number of values between any two values and this is a difference with discrete probability functions.

Another difference is that while discrete probability function’s values have a non-zero probability, a possibility of any specific(exact) value in continuous probability functions is zero.

  • Why the probability of a specific value is zero?

Suppose there is a square whose area is 1 and any sub-area in the square denotes a probability. As we all know, we need a width and a height to calculate a probability and in this sense, we can calculate the possibility of a continuous random variable with given intervals, because those intervals play a role of widths and heights. However, we can’t calculate the area of a specific dot in the square and this is why the probability of particular value in continuous random variables(distributions) is zero.

Figure 3.
  • How to find probabilities for continuous random distribution?

Probabilities for continuous distributions are measured over ranges of values.

Figure 4. Example of probability density function and calculation of its probability

If the probability density function 𝒇𝙭(𝓍) for the continuous random variable is given, then we can calculate the probability for the ranges of values(upper and lower limits) by integrating 𝒇𝙭(𝓍) on an interval.

3. Codes

Codes that I used to produce figure 2 is as below.

4. Reference

[1]https://statisticsbyjim.com/basics/probability-distributions/#comments

[2]https://smallbusiness.chron.com/role-probability-distribution-business-management-26268.html

--

--