Discrete Random Variables Statistics Discrete Random Variables https://www.123rf.com/photo_6622261_statistics-and-analysis-of-data-as-background.html
Random Variables A random variable
Random Variables A random variable “varies” (not always the same)
Random Variables A random variable “varies” is “random”
Random Variables Random variable… hmmm… what’s that? http://www.testically.org/wp-content/uploads/2010/11/hmm.jpg
Random Variables A random variable… Is a way to quantify outcomes of unforecastable processes
Random Variables For a coin toss: X is a random variable that assigns a number to an outcome https://www.khanacademy.org/math/statistics-probability/random-variables-stats-library/discrete-and-continuous-random-variables/v/random-variables
Random Variables This allows us to do arithmetic with the outcomes
Random Variables Fred + Angela – Juan = ? Not easy!
Random Variables 1 + 7 – 4.2 = ? Much easier!
Random Variables There are two types of random variables:
Random Variables There are two types of random variables: discrete
Random Variables There are two types of random variables: discrete continuous
Random Variables A discrete variable has countable values, such as a list of non-negative integers
Random Variables Or the list of people in a club
Random Variables The values are distinct or separate
Random Variables Not discreet (which means on the down low, under the radar)
Random Variables There are two types of random variables: discrete continuous
Random Variables A continuous variable can take on any value in an interval
Which? TYPES OF STATISTICS IN-CLASS PROBLEM https://www.khanacademy.org/math/statistics-probability/random-variables-stats-library/discrete-and-continuous-random-variables/v/random-variables
Which? TYPES OF STATISTICS IN-CLASS PROBLEM https://www.khanacademy.org/math/statistics-probability/random-variables-stats-library/discrete-and-continuous-random-variables/v/random-variables
Random Variables A discrete variable can have an infinite number of outcomes
Random Variables A discrete variable can have an infinite number of outcomes “countably infinite”
Which? TYPES OF STATISTICS IN-CLASS PROBLEM https://www.khanacademy.org/math/statistics-probability/random-variables-stats-library/discrete-and-continuous-random-variables/v/random-variables
Which? TYPES OF STATISTICS IN-CLASS PROBLEM https://pixabay.com/p-1150021/?no_redirect
Questions?
Discrete Probability P(X=x) P(x) means “the probability that the random variable X equals the value x”
Discrete Probability Remember “Σ” means “the sum of”
Discrete Probability Rules for discrete probabilities: Σ P(x) = 1 or 100%
Discrete Probability Rules for discrete probabilities: Σ P(x) = 1 or 100% 0 ≤ P(x) ≤ 1 or 100%
Discrete Probability A probability histogram:
Discrete Probability A lot of variables can have only two values: M/F H/T Black/White On/Off 1/0
Binomial Probability Variables that can have only two values are called: “binomial” The values are mutually exclusive events
Binomial Probability The probability of one of the values occurring is called “p” The probability of the other value occurring is called “q”
Binomial Probability p + q = 1 or 100%
Binomial Probability A binomial experiment:
Binomial Probability A binomial experiment: is performed a fixed number of times
Binomial Probability A binomial experiment: is performed a fixed number of times each repetition is called a “trial”
Binomial Probability A binomial experiment: the trials are independent
Binomial Probability A binomial experiment: the trials are independent the outcome of one trial will not affect the outcome of another trial
Binomial Probability A binomial experiment: for each trial, there are two mutually exclusive outcomes: success or failure
Binomial Probability A binomial experiment: the probability of success is the same for each trial
Binomial Probability Notation: “n” trials
Binomial Probability Notation: “n” trials “p” is the probability of success
Binomial Probability Notation: “n” trials “p” is the probability of success “q” or “1-p” is the probability of failure
Binomial Probability Notation: “n” trials “p” is the probability of success “q” or “1-p” is the probability of failure “X” is the number of successes in the “n” trials
Binomial Probability 0 ≤ p ≤ 1 0 ≤ q ≤ 1 and: 0 ≤ x ≤ n
Binomial Probability Binomial Experiment Rules:
Binomial Probability Binomial Experiment Rules: You must have a fixed number of trials
Binomial Probability Binomial Experiment Rules: You must have a fixed number of trials Each trial is an independent event
Binomial Probability Binomial Experiment Rules: You must have a fixed number of trials Each trial is an independent event There are only two outcomes
BINOMIAL PROBABILITY IN-CLASS PROBLEM Binomial or not? Tossing a coin a hundred times to see how many land on heads
Binomial or not? Tossing a coin until you get heads BINOMIAL PROBABILITY IN-CLASS PROBLEM Binomial or not? Tossing a coin until you get heads
Binomial or not? Asking 100 people how much they weigh BINOMIAL PROBABILITY IN-CLASS PROBLEM Binomial or not? Asking 100 people how much they weigh
Binomial or not? Asking 100 people if they have ever been to Paris BINOMIAL PROBABILITY IN-CLASS PROBLEM Binomial or not? Asking 100 people if they have ever been to Paris
Questions?
Binomial Probability Remember nCx is the number of ways of obtaining x successes in n trials
Binomial Probability The probability of obtaining x successes in n independent trials of a binomial experiment: P(x) = nCx px(1-p)n-x or: P(x) = nCx px(q)n-x
Binomial Probability To work a binomial problem:
Binomial Probability To work a binomial problem: What is a “Success”? Success must be for a single trial
Binomial Probability To work a binomial problem: What is the probability of success “p”?
Binomial Probability To work a binomial problem: What is the probability of failure “q”?
Binomial Probability To work a binomial problem: What is the number of trials?
Binomial Probability To work a binomial problem: What is the number of successes out of those trials needed?
Binomial Probability To work a binomial problem: What is a “Success”? What is the probability of success “p”? What is the probability of failure “q”? What is the number of trials? What is the number of successes out of those trials needed?
BINOMIAL PROBABILITY IN-CLASS PROBLEM What is the probability of rolling exactly two sixes in 6 rolls of a die?
BINOMIAL PROBABILITY IN-CLASS PROBLEM What is the probability of rolling exactly two sixes in 6 rolls of a die? What is a “Success”?
BINOMIAL PROBABILITY IN-CLASS PROBLEM What is the probability of rolling exactly two sixes in 6 rolls of a die? What is a “Success”? Success = "Rolling a 6 on a single die"
BINOMIAL PROBABILITY IN-CLASS PROBLEM What is the probability of rolling exactly two sixes in 6 rolls of a die? What is the probability of success?
BINOMIAL PROBABILITY IN-CLASS PROBLEM What is the probability of rolling exactly two sixes in 6 rolls of a die? What is the probability of success? p = 1/6
BINOMIAL PROBABILITY IN-CLASS PROBLEM What is the probability of rolling exactly two sixes in 6 rolls of a die? What is the probability of failure?
BINOMIAL PROBABILITY IN-CLASS PROBLEM What is the probability of rolling exactly two sixes in 6 rolls of a die? What is the probability of failure? q = 5/6
BINOMIAL PROBABILITY IN-CLASS PROBLEM What is the probability of rolling exactly two sixes in 6 rolls of a die? What is the number of trials?
BINOMIAL PROBABILITY IN-CLASS PROBLEM What is the probability of rolling exactly two sixes in 6 rolls of a die? What is the number of trials? n = 6
BINOMIAL PROBABILITY IN-CLASS PROBLEM What is the probability of rolling exactly two sixes in 6 rolls of a die? What is the number of successes out of those trials needed?
BINOMIAL PROBABILITY IN-CLASS PROBLEM What is the probability of rolling exactly two sixes in 6 rolls of a die? What is the number of successes out of those trials needed? x = 2
BINOMIAL PROBABILITY IN-CLASS PROBLEM What is the probability of rolling exactly two sixes in 6 rolls of a die? You could list the outcomes: FFFFFS FFFFSS FFFSSS FFSSSS FSSSSS SSSSSS FFFSFS FFSFFS FSFFFS SFFFFS SFFFSS SFFSSS SFSSSS SFSFFS SSFFFS … Aagh!!!
BINOMIAL PROBABILITY IN-CLASS PROBLEM Remember: The probability of getting exactly x success in n trials, with the probability of success on a single trial being p is: P(x) = nCx × px × qn-x
BINOMIAL PROBABILITY IN-CLASS PROBLEM What is the probability of rolling exactly two sixes in 6 rolls of a die? P(2) = 6C2 × (1/6)2 × (5/6)6-2
BINOMIAL PROBABILITY IN-CLASS PROBLEM What is the probability of rolling exactly two sixes in 6 rolls of a die? P(2) = 6C2 × (1/6)2 × (5/6)6-2 = 15 × .028 × .48 ≈ .20
Questions?
Binomial Probability The mean and standard deviation of a binomial are easy!
Binomial Probability The mean of a binomial experiment: μx = np
Binomial Probability The variance of a binomial experiment: σx2 = np(1−p) or: σx2 = npq
Binomial Probability The standard deviation of a binomial experiment: σx = np(1−p) or: σx = npq
Binomial Probability A binomial distribution histogram: http://d2r5da613aq50s.cloudfront.net/wp-content/uploads/460747.image0.jpg
TYPES OF STATISTICS IN-CLASS PROBLEM What is p?
TYPES OF STATISTICS IN-CLASS PROBLEM What is p? p = 0.2
TYPES OF STATISTICS IN-CLASS PROBLEM What is q?
TYPES OF STATISTICS IN-CLASS PROBLEM What is q? q = 1-p = 1-.2 = .8
TYPES OF STATISTICS IN-CLASS PROBLEM What is n?
TYPES OF STATISTICS IN-CLASS PROBLEM What is n? n = 15
TYPES OF STATISTICS IN-CLASS PROBLEM What is μx?
TYPES OF STATISTICS IN-CLASS PROBLEM What is μx? μx = np = 15×.2 = 3
TYPES OF STATISTICS IN-CLASS PROBLEM What is σx2?
What is σx2? σx2 = npq = 15×.2×.8 = 2.4 TYPES OF STATISTICS IN-CLASS PROBLEM What is σx2? σx2 = npq = 15×.2×.8 = 2.4
TYPES OF STATISTICS IN-CLASS PROBLEM What is σx?
What is σx? σx = npq = 15×.2×.8 ≈ 1.5 TYPES OF STATISTICS IN-CLASS PROBLEM What is σx? σx = npq = 15×.2×.8 ≈ 1.5
Questions?
Poisson Probability The Poisson distribution was introduced by the French mathematician Siméon Denis Poisson https://en.wikipedia.org/wiki/Siméon_Denis_Poisson#/media/File:Simeon_Poisson.jpg
Poisson Probability It is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known constant rate and independently of the time since the last event
Poisson Probability For instance, an individual keeping track of the amount of mail they receive each day may notice that they receive an average number of 4 letters per day
Poisson Probability If receiving any particular piece of mail does not affect the arrival times of future pieces of mail, the number of pieces of mail received in a day exhibits a Poisson distribution
Poisson Probability The number of students who arrive at the student union per minute will likely not follow a Poisson distribution: the rate is not constant (low rate during class time, high rate between class times)
Poisson Probability The number of students who arrive at the student union per minute will likely not follow a Poisson distribution: the arrivals of individual students are not independent (students tend to come in groups)
Poisson Probability The number of magnitude 5 earthquakes per year in a country would not follow a Poisson distribution because one large earthquake increases the probability of aftershocks of similar magnitude
Poisson Probability Among patients admitted to the intensive care unit of a hospital, the number of days that the patients spend in the ICU is not Poisson distributed because the number of days cannot be zero
Poisson Probability The Poisson distribution may be useful to model events such as: -The number of meteorites greater than 1 meter diameter that strike Earth in a year -The number of patients arriving in an emergency room between 10 and 11 pm
Poisson Probability The Poisson distribution is an appropriate if: -k is the number of times an event occurs in an interval -events occur independently -the rate at which events occur is constant
Poisson Probability The Poisson distribution is an appropriate if: -two events cannot occur at exactly the same instant -the probability of an event in a small sub-interval is proportional to the length of the sub-interval
Poisson Probability The Poisson distribution is an appropriate if: the actual probability distribution is given by a binomial distribution and the number of trials is sufficiently bigger than the number of successes one is asking about
Poisson Probability The average number of events in an interval is designated λ (lambda) The probability of observing k events in an interval is given by: P = e −λ λ 𝒌 k!
Poisson Probability As you can imagine, it is painful to calculate
Poisson Probability Excel has a formula:
Poisson Probability Excel has a formula: λ k False (for an individual probability) True (for a cumulative probability)
Poisson Probability Or: http://stattrek.com/online-calculator/poisson.aspx
Hypergeometric The hypergeometric distribution describes the probability of k successes in n draws, without replacement, from a finite population of size N that contains exactly K objects with that feature, wherein each draw is either a success or a failure
Hypergeometric In contrast, the binomial distribution describes the probability of k successes in n draws with replacement
Hypergeometric In Excel:
Hypergeometric Or use: http://stattrek.com/online-calculator/hypergeometric.aspx
Hypergeometric The test is often used to identify which sub-populations are over- or under-represented in a sample
Hypergeometric For example, a marketing group could use the test to understand their customer base by testing a set of known customers for over-representation of people under 30
Questions?