วันอาทิตย์ที่ 28 มกราคม พ.ศ. 2567

Probability distribution : PMF vs CDF vs PDF

คือการกระจายตัวของค่าความน่าจะเป็นตามจำนวนข้อมูลที่มีโอกาสเกิดตามความน่าจะเป็นแต่ละค่า

https://medium.com/probablity-and-statistics-for-data-science/probability-distributions-5f457cde025e









In the picture, Y-axis in the normal distribution represents the "density of probability." Intuitively, it shows the chance of obtaining values near corresponding points on the X-axis.

The area under the curve between two X values tells the probability (or percent frequency) of variables taking on a range of the values.

Probability mass function vs probability density function 






















The Cumulative Distribution Function (CDF) of a random variable X, denoted as F(x), is defined as the probability that X takes on a value less than or equal to x.

F(x)=P(Xx)

This function gives us the cumulative probability up to a certain point x.












  • PMF (Probability Mass Function): This is used for discrete random variables. The PMF gives the probability that a discrete random variable takes on a specific value. For example, if you're rolling a six-sided die, the PMF would tell you the probability of rolling any particular number (e.g., P(X=3)=16P(X = 3) = \frac{1}{6}).

  • PDF (Probability Density Function): This is used for continuous random variables. Unlike the PMF, the PDF does not give the probability of the random variable taking on a specific value (since that probability is technically 0 for continuous variables). Instead, the PDF describes the relative likelihood that the random variable falls within a particular range of values. The area under the PDF curve over an interval gives the probability that the random variable falls within that interval.

In summary:

  • PMF is for discrete variables and provides the probability of exact outcomes.
  • PDF is for continuous variables and provides a density function, where probabilities are found by integrating over an interval.