Menu

Discrete and Continuous Random Variables

Discrete and Continuous Random Variables

A random variable is a number that depends on the outcome of a random process. Instead of describing outcomes in words, it assigns each outcome a numerical value, allowing calculations.

Discrete Random Variable

A discrete random variable takes countable values, usually whole numbers. The number of orders placed in an hour, or the number of heads in three coin flips, are both discrete.

Its probabilities are listed in a probability mass function (PMF), where each possible value has its own probability, and all probabilities add up to 1.

Continuous Random Variable

A continuous random variable can take any value within a range, such as delivery time or a person’s height. Because there are infinitely many possible values, the probability of landing on one exact value is 0.

Instead, we measure probability over an interval using the area under a curve called the probability density function (PDF).

Feature

Discrete

Continuous

ValuesCountableAny value in a range
Described byPMFPDF
Probability of one exact valueCan be above 0Always 0
Probability of a rangeAdd the probabilitiesFind the area under the curve

Example: Let X be the number of heads in two fair coin flips. The outcomes HH, HT, TH, TT are equally likely, so P(X = 0) = 1/4, P(X = 1) = 2/4 and P(X = 2) = 1/4. These add up to 1, which is the check every valid PMF must pass.


Probability and Statistics for Data Science

AP

Abhishek Pati



Learn via Video Course

Probability and Statistics for Data Science Logo

Probability and Statistics for Data Science

4 hrs



Get in Touch For Details