Discrete Probability Distributions

Cards (18)

  • random experiment:
    It could (theoretically) be infinitely repeated. The outcome is uncertain.
    When we conduct a random experiment, we are sampling simple events from a sample space to get an outcome.
    We can't be 100% certain which outcome will occur each time the experiment is repeated.
    There are some events that are less likely to occur or more likely to occur, however.
    An outcome's probability provides us with information that can be used to make decisions about data when we're faced with randomness.
  • What is a random variable and what does it allow for?
    A random variable is a set of values that quantify the outcome of the random experiment.
    Allows you to map the outcomes of a random experiment to numbers.
    Usually denoted with a capital letter.
  • What is a discrete random variable?
    A discrete random variable can assume only a finite number of different values. – number of children in a family, eye colour, coin toss, etc.
  • What is a continuous random variable?
    A continuous random variable is arbitrarily precise, and thus can take all infinite values in some range. – height, age, weight, etc.
  • What does a probability distribution do?

    A probability distribution maps the values of a random variable to the probability of it occurring.
    X axis is the variable, y axis is probability of that variable occurring.
  • Probability Mass Function: For discrete distributions
    For discrete distributions it maps probability to each outcome value via a probability mass function.
    A probability mass function gives the probability that a discrete random variable (X) exactly equals a specific value (x):
    f(x)=P(X=x)       
  • Frequency distribution: Mapping the values of the random variable with how often they occur
  • You can plot a discrete probability distribution using a bar plot. Discrete variables are always displayed in a bar plot.
  • Binomial Distributions
    A common type of discrete probability distribution is the binomial distribution
    Properties:
    There are only two possible outcomes, one reflecting success and one reflecting failure
    The number of observations (n) is fixed
    Each observation is independent of each other
    The probability of success (p) is the same for each observation (doesn’t mean each outcome has the same probability, outcome 1 probability will be the same across all observations).
    We are interested in the number of successes (k) given a fixed number of trials (n)
  • Binomial Probability Mass Function:
    k = number of successes
    n = total trials,
    p = probability of success
    q = (1p) or probability of failure
    (n over k) n choose k, or the number of ways to select k successes from n observations.
  • Binomial PMF steps:
    Step 1 - Identify n, pq, and k and plug them into the equation
    Step 2 - Reflects the number of ways we could get k successes from n trials. Use the formula n!/k!(n-k)!. ! represents a factorial, take a factorial and times it by each descending factorial (3*2*1).
    Step 3 - p^k
    Step 4 - q^(n-k)
    Step 5 - put it all together.
  • Binomial PMF in R
    Luckily, you can use the dbinom() function in R to calculate these things for you:
    dbinom(x, size, prob) where x=k(successes), size=n(trials), prob=p(probability of success)
    We can pass these values to ggplot to produce a bar plot that shows the binomial probability distribution.
  • Cumulative probability
    We've been looking at the probability mass function to investigate the total probability of a discrete outcome. The Cumulative distribution function allows us to see the total probability of all values before or after a given point.
    • With a binomial distribution, the cumulative probability function simply sums the probabilities of the individual outcomes.
  • Cumulative probability in R
    • In R, we can use pbinom() to get cumulative probabilities:
    • pbinom() needs x, mean and sd. But, differs from dbinom, as it will calculate probability to the left of x. IF 1-pbinom() will calculate cumulative probability after x.
  • What do these symbols mean?
    A) Y is either a subset or equal to X
    B) Y is a single element within X
    C) X is either a subset or equal to Y
  • When an object is an element of Set A or Set B this is known as the Union.
  • When an object is an element of Set B given set A, this refers to conditional probability.
  • What do these mean?
    A) intersection between a and set C is an empty set
    B) mutually exclusive
    C) set A consists of elements, a