Discrete and random variables Flashcards
What is a random variable?
A random variable is a quantity that can take a range of values, which cannot be predicted with certainty but is described probabilistically. e.g. rolling a dice
what is a statistical distribution
A statistical distribution is the arrangement of values of a variable, showing their observed or theoretical frequency of occurrence.
what is a discrete random variable
A discrete random variable can only take a countable number of values. Example: The number of heads in 3 coin tosses.
what is the sample space
The sample space is the set of all possible outcomes of a random experiment. For example, when tossing a coin, the sample space is {Heads, Tails}.
What is an empirical distribution?
An empirical distribution represents the observed frequencies of different outcomes from a sample. Example: The number of recyclable items picked up during a walk.
what is the probability mass function
The PMF of a discrete random variable π gives the probability that π takes a specific value π₯
P(X=x)
What is an important property of the PMF?
The sum of all probabilities in the PMF equals 1:
βP(X=x)=1
what is the cumulative distribution function
The CDF is the probability that π takes a value less than or equal to a given π₯. It is the cumulative sum of the PMF: ππ(πβ€π₯).
What is the complement rule in the context of CDF?
ππ(π>2)=1βππ(πβ€2)
How do you calculate the mean (expected value) of a random variable π?
The mean (or expected value) is the weighted average of all possible values of π, weighted by their probabilities:
E(x) = sum of all xPr(X=x) up to n
what does variance do
quantify the spread, or degree to which values differ from the expected value the variance of X
What is the formula for calculating the variance of a random variable π?
π£ππ(π)=β(π₯βπΈ(π))^2(ππ(π=π₯))
What is the standard deviation of a random variable π?
π π(π)=βπ£ππ(π)
3 theoretical distributions for particular discrete random variables
- Bernoulli distribution
- binomial RV
- poisson
what is bernoulli distribution
A discrete random variable that can only take two possible outcomes: 0 (failure) or 1 (success)
What are the probabilities in a Bernoulli distribution?
1 with probability π
0 with probability π=1βπ
Pr(X=1)=p (success)
Pr(X=0)=1βp (failure)
expected value for Bernoulli distribution
πΈ(π)=π
variance for Bernoulli distribution
πππ(π)=π(1βπ)
what is binomial random variable
A Binomial RV represents the number of successes in π independent Bernoulli trials with the same probability of success, π
how is binomial RV written
Let π be a Binomial RV described by two parameters:
πβΌBinomial(π,π).
where:
number of trials π
probability of success π.
What are the key conditions for a Binomial distribution? (4)
Each trial has only two possible outcomes (success/failure).
There is a fixed number of trials, π
The probability of success,
π, is the same for all trials.
Each trial is independent of the others.
What does the PMF formula represent for binomial distribution?
The probability of getting exactly x successes in π independent trials.
PMF formula for binomial distribution
check book
Consider the probability of success of a trial is 0.1 and there are 10 trials. What is the probability of exactly 2 successes?
0.1937
What determines the shape of the Binomial distribution?
The shape is influenced by the number of trials (π) and the probability of success (π).
what is the shape of binomial distribution if n=10 and p=0.1
when π is low (e.g. 0.1) we expect a small number of successes out of the 10 trials. The distribution is right-skewed, meaning most outcomes have a small number of successes.
what is the shape of binomial distribution if n=10 and p=0.5
when π is 0.5 we expect about half of the 10 trials are successful. The distribution is symmetrical, with the highest probability around half of the trials being successful.
what is the shape of binomial distribution if n=10 and p=0.9
when π is high (e.g. 0.9) we expect a large number of successes out of the 10 trials The distribution is left-skewed, meaning most outcomes have a high number of successes.
What is the formula for the expected value (mean) of a Binomial distribution?
πΈ(π)=ππ
What is the expected value of π when n=4 and p=0.25?
E(X)=4Γ0.25=1
variance of binomial distribution
πππ(π)=ππ(1βπ)
What is the variance of
π when n=4 and p=0.25?
Var(X)=4Γ0.25Γ(1β0.25)=0.75
How is the cumulative distribution function (CDF) found?
The cumulative distribution function ππ(πβ€π) is found from the PMF as before.
Example Let πβΌBinomial(π=5,π=0.5)
ππ(πβ€2)=ππ(π=0)+ππ(π=1)+ππ(π=2)
what are upper tail probabilities
βUpper tailβ probabilities such as ππ(π>3) are often found using the complement rule
ππ(π>3)=1βππ(πβ€3)
what are interval based probabilities
βInterval-basedβ probabilities, such as ππ(0<π<4), are found using
ππ(0<π<4)=ππ(π=1)+ππ(π=2)+ππ(π=3)
conditions of binomial RV
Let πβΌπ΅πππππππ(π,π) then π is the number of successes out of π trials if
there are only two possible outcomes for each trial
there are a fixed number of trials πn
each trial is independent of other trials
the probability of success, π, is the same for all trials.
what is the poisson distribution
It describes the number of random events occurring in an interval (time, space, volume), given:
Events occur at a known constant mean rate π.
Events occur independently of the time since the last event.
A Poisson random variable π is a discrete random variable with an infinite, but countable, set of possible values, π can take values 0, 1, 2, 3, β¦, and π>0
3 examples of poisson distribution
Number of cars passing a location in a 10-minute interval.
Number of recyclable items picked up in a half-mile walk.
Number of certain cells in a blood sample of a given volume.
concise method of writing PMF for poisson
πβΌPoisson(π)
formula for The PMF for a Poisson random variable π is:
see notes
What is probability that π=3 given that events occur with a mean rate π=4?
0.1954
What are the conditions required for using a Poisson distribution? (4)
Random occurrences in the given interval.
Singly occurring events (two cannot happen at exactly the same time).
Independence (one event does not affect another).
Uniformity (the number of expected events is proportional to the interval size).
The mean number of errors on a page in a textbook was 1.7. What is the probability that on a page there are:
no errors
2 or more errors
no errors: 0.1826835
2 or more errors:
complement rule
Pr(Xβ₯2)=1β[Pr(X=0)+Pr(X=1)] = 0.5067
What is the relationship between the mean and variance in a Poisson distribution?
The expected value (mean) and variance are both equal to the rate parameter π:
E(X)=Var(X)=Ξ»
When does the Poisson distribution approximate the binomial distribution?
The number of trials is large (nββ).
The success probability is small (pβ0).
This works because in a Binomial (n,p) distribution, the mean is np, which matches the Poisson π when π is large and π is small.
comparing poisson distribution with binomial distribution: A rare condition affects 1 in 1000 people. What is the probability that exactly 2 people in a sample of 2000 are affected?
binomial: 0.270806
poisson: 0.2706706
This similarity only holds if: π is large (tending to β)
π is small