Probability Functions - Discrete & Continuous

Random Variables

  • A random variable is one whose values depend on the outcomes of a random phenomenon.

  • A random variable can be discrete or continuous.

Discrete Probability Distributions

  • A probability distribution is a list of all possible outcomes of a random variable along with their corresponding probability values.

  • Example: Outcome of a roll of a die:

    • Outcome 1: Probability 1/6

    • Outcome 2: Probability 1/6

    • Outcome 3: Probability 1/6

    • Outcome 4: Probability 1/6

    • Outcome 5: Probability 1/6

    • Outcome 6: Probability 1/6

Probability Functions

  • Functions describe the relation between an input variable and an output variable.

  • We can find the value of the outcome variable, given the value of the input variable.

  • f(x)=x+7f(x) = x + 7 (Example function)

  • Variables are represented by uppercase letters.

  • Values of a variable are represented by lowercase letters.

Parameters

  • Parameter defines the function.

  • Usually written in Greek letters (e.g., β).

Probability Mass Function (PMF)

  • f(x)=P(X=x)f(x) = P(X = x)

  • Because it outputs a probability P.

  • In a PMF:

    • Output values are between 0 and 1.

    • The sum of all outcomes is equal to 1.

  • A probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment.

Probability Density Function (PDF)

  • Deals with continuous random variables.

  • Unlike PMF, gives the probability of obtaining a specific value.

  • Example: Hedgehog Height
    Bin Width = 4
    *Density = Frequency / Bin Width
    *Relative Density = Density / cf , where cf is the frequency

  • Example Calculation: Density = 37/4=9.2537 / 4 = 9.25

  • Example Calculation: Relative density = 9.25/196=0.0479.25 / 196 = 0.047

  • Area = Relative density * Bin Width. The bin height is the probability P of getting a hedgehog height (h) between 13 and 16.99 cm.

  • Area = 0.0474=0.1880.047 * 4 = 0.188

  • In a PDF:

    • Output values are greater than or equal to 0.

    • The output values of a PDF are not probabilities.

    • The probabilities of obtaining a given value are estimated by the area under that curve or line.

Key Differences

  • Discrete probability functions are referred to as probability mass functions (PMF).

  • Continuous probability functions are referred to as probability density functions (PDF).

Summary

  • A random variable is any variable whose value is the outcome of a random event.

  • A probability distribution is a list of all the possible values a random variable can take along with their corresponding probability.

  • With the function that describes a probability distribution, we can easily calculate the probability of any outcome for a random variable.

  • For discrete random variables, we use a probability mass function or PMF.

  • For continuous random variables, we use a probability density function or PDF.

  • Unlike the PMF, in a PDF it is the area between two values or the area beyond or before one value that will tell us the probability of obtaining a specified value for the random variable.

  • The whole area under the curve of a PDF will sum up to 1.