1. Home
  2. Explore
  3. Computer Science
  4. Continuous Random Variables

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Continuous Random Variables

  • 34Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Discrete Distributions

What is the story of a geometric random variable?

34 questions

  1. 1

    What is the story of a geometric random variable?

    Model answer

    It models the number of independent trials until the first success, where each trial has the same probability ppp of success.

    Explanation

    The geometric distribution arises from repeating independent Bernoulli trials until a success occurs. The number of trials needed is the random variable, with values starting at 1.

  2. 2

    What are the possible values of a geometric random variable?

    Model answer

    Positive integers starting from 1. It cannot be 0 because at least one trial is needed to get a success.

    Explanation

    The geometric random variable counts trials, so the minimum is 1. Values like 2.5 are impossible because it is discrete.

  3. 3

    Write the probability mass function (PMF) of a geometric random variable with parameter ppp.

    Model answer

    P(X=n)=(1−p)n−1pP(X = n) = (1-p)^{n-1} pP(X=n)=(1−p)n−1p for n=1,2,3,…n = 1, 2, 3, \dotsn=1,2,3,…

    Explanation

    The first success occurs on trial nnn iff the first n−1n-1n−1 trials are failures (probability (1−p)n−1(1-p)^{n-1}(1−p)n−1) and trial nnn is a success (probability ppp).

  4. 4

    What is the expected value of a geometric random variable?

    Model answer

    E[X]=1pE[X] = \frac{1}{p}E[X]=p1​.

    Explanation

    This can be derived from the PMF or by summing a geometric series. It makes intuitive sense: if success probability is ppp, average number of trials to first success is 1/p1/p1/p.

  5. 5

    What is the variance of a geometric random variable?

    Model answer

    Var(X)=1−pp2\text{Var}(X) = \frac{1-p}{p^2}Var(X)=p21−p​.

    Explanation

    Variance measures spread. For small ppp, variance is large because the number of trials can vary widely.

  6. 6

    What is the story of a negative binomial random variable?

    Model answer

    It models the number of independent trials needed to achieve a fixed number rrr of successes, where each trial has probability ppp of success.

    Explanation

    This generalizes the geometric: instead of waiting for the first success, we wait for the rrrth success. Trials are independent and identically distributed.

  7. 7

    What are the possible values of a negative binomial random variable?

    Model answer

    r,r+1,r+2,…r, r+1, r+2, \dotsr,r+1,r+2,… (at least rrr trials are needed to get rrr successes).

    Explanation

    You need at least as many trials as successes. The smallest possible value is rrr (all successes), and it increases without bound.

  8. 8

    Write the PMF of a negative binomial random variable with parameters rrr and ppp.

    Model answer

    P(X=n)=(n−1r−1)pr(1−p)n−rP(X = n) = \binom{n-1}{r-1} p^r (1-p)^{n-r}P(X=n)=(r−1n−1​)pr(1−p)n−r for n=r,r+1,…n = r, r+1, \dotsn=r,r+1,…

    Explanation

    The last trial must be a success. Among the first n−1n-1n−1 trials, we need r−1r-1r−1 successes, which can occur in (n−1r−1)\binom{n-1}{r-1}(r−1n−1​) ways.

  9. 9

    What is the expected value of a negative binomial random variable?

    Model answer

    E[X]=rpE[X] = \frac{r}{p}E[X]=pr​.

    Explanation

    This follows from the fact that a negative binomial is the sum of rrr independent geometric random variables, each with mean 1/p1/p1/p.

  10. 10

    What is the variance of a negative binomial random variable?

    Model answer

    Var(X)=r(1−p)p2\text{Var}(X) = \frac{r(1-p)}{p^2}Var(X)=p2r(1−p)​.

    Explanation

    Since the negative binomial is a sum of rrr independent geometrics, the variance is rrr times the variance of a geometric.

  11. 11

    How is a negative binomial random variable related to geometric random variables?

    Model answer

    A negative binomial can be expressed as the sum of rrr independent geometric random variables, each with success probability ppp.

    Explanation

    The time to the rrrth success is the sum of the waiting times for each successive success. Each waiting time is geometric.

  12. 12

    In the jury selection example, why might the binomial distribution be an approximation rather than exact?

    Model answer

    Because the binomial assumes constant probability of success (sampling with replacement), but jury selection is without replacement, so the probability changes slightly after each draw.

    Explanation

    When drawing without replacement from a finite population, the hypergeometric distribution is exact. The binomial is a good approximation when the population is large relative to the sample size.

  13. 13

    How did Justice Breyer use the binomial distribution to analyze jury bias?

    Model answer

    He hypothesized that if the jury pool is 60/1000 from a minority group, the number of minority jurors in a 12-person jury is binomial with n=12 and p=0.06, and computed the probability of at least one minority juror.

    Explanation

    Breyer argued that the observed all-white juries were unlikely under this binomial model, suggesting bias. The probability of at least one minority juror was about 52%.

  14. 14

    Compare the binomial approximation to the exact hypergeometric probability in the jury example: what were the two probabilities?

    Model answer

    The binomial gave 0.5241 and the hypergeometric gave 0.5261; the approximation was very close.

    Explanation

    Because the population (1000) is much larger than the sample (12), the change in probability is negligible, making the binomial a good approximation.

  15. 15

    In Bitcoin mining, each attempt has probability p=(1/2)gp = (1/2)^gp=(1/2)g of success. What random variable models the number of attempts until the first Bitcoin is mined?

    Model answer

    Geometric with success probability ppp.

    Explanation

    Each attempt is an independent trial with same success probability. The number of attempts until the first success follows a geometric distribution.

  16. 16

    In Bitcoin mining, what random variable models the number of attempts until the second Bitcoin is mined?

    Model answer

    Negative binomial with r=2r=2r=2 and success probability ppp.

    Explanation

    We wait for the second success. The number of attempts until the rrrth success is negative binomial.

  17. 17

    What is the key difference between a probability mass function (PMF) and a probability density function (PDF)?

    Model answer

    A PMF gives the probability that a discrete random variable equals a specific value; a PDF gives the derivative of probability for a continuous random variable, so it is not a probability itself but its integral gives probability.

    Explanation

    For discrete, probabilities are directly assigned to points. For continuous, probabilities are assigned to intervals via integration of the PDF.

  18. 18

    For a continuous random variable, how do you find the probability that it falls between aaa and bbb?

    Model answer

    Integrate the PDF from aaa to bbb: P(a<X<b)=∫abf(x) dxP(a < X < b) = \int_a^b f(x) \, dxP(a<X<b)=∫ab​f(x)dx.

    Explanation

    The area under the PDF curve between aaa and bbb represents the probability. This is the continuous analog of summing probabilities.

  19. 19

    What must the integral of a PDF over its entire range equal? Why?

    Model answer

    It must equal 1, because the total probability that the random variable takes some value is 1.

    Explanation

    The integral over all possible values represents the total probability, which must be 1.

  20. 20

    Can a PDF be greater than 1? Explain.

    Model answer

    Yes, because the PDF is not a probability; it is a density. If the width of the interval is less than 1, the height can be greater than 1 to ensure the area under the curve is 1.

    Explanation

    PDF values can exceed 1 as long as the total area is 1. For example, a uniform distribution on [0,0.5] has PDF = 2, which is >1.

  21. 21

    Define the cumulative distribution function (CDF) of a continuous random variable.

    Model answer

    F(x)=P(X≤x)=∫−∞xf(t) dtF(x) = P(X \leq x) = \int_{-\infty}^x f(t) \, dtF(x)=P(X≤x)=∫−∞x​f(t)dt.

    Explanation

    The CDF gives the probability that the random variable is less than or equal to a given value. It is a non-decreasing function from 0 to 1.

  22. 22

    How can you compute P(X>a)P(X > a)P(X>a) using the CDF?

    Model answer

    P(X>a)=1−F(a)P(X > a) = 1 - F(a)P(X>a)=1−F(a).

    Explanation

    Since F(a)F(a)F(a) gives P(X≤a)P(X \leq a)P(X≤a), the complement gives the probability of being greater than aaa.

  23. 23

    How can you compute P(a<X<b)P(a < X < b)P(a<X<b) using the CDF?

    Model answer

    P(a<X<b)=F(b)−F(a)P(a < X < b) = F(b) - F(a)P(a<X<b)=F(b)−F(a).

    Explanation

    The probability of the interval is the difference between the CDF at the endpoints, as F(b)F(b)F(b) includes all probability up to bbb, and F(a)F(a)F(a) includes up to aaa.

  24. 24

    What is the relationship between the PDF and CDF?

    Model answer

    The PDF is the derivative of the CDF: f(x)=ddxF(x)f(x) = \frac{d}{dx} F(x)f(x)=dxd​F(x).

    Explanation

    By the Fundamental Theorem of Calculus, the derivative of the integral gives the integrand. This means the PDF represents the instantaneous rate of change of the CDF.

  25. 25

    Describe the probability density function of a uniform random variable on the interval [α,β][\alpha, \beta][α,β].

    Model answer

    f(x)=1β−αf(x) = \frac{1}{\beta-\alpha}f(x)=β−α1​ for α≤x≤β\alpha \leq x \leq \betaα≤x≤β, and 0 otherwise.

    Explanation

    The uniform distribution gives constant density over the interval, so the height is the reciprocal of the interval length to ensure total area 1.

  26. 26

    What are the expectation and variance of a uniform random variable on [α,β][\alpha, \beta][α,β]?

    Model answer

    E[X]=α+β2E[X] = \frac{\alpha+\beta}{2}E[X]=2α+β​, Var(X)=(β−α)212\text{Var}(X) = \frac{(\beta-\alpha)^2}{12}Var(X)=12(β−α)2​.

    Explanation

    The mean is the midpoint of the interval. The variance measures spread; it is proportional to the square of the interval length.

  27. 27

    If a bus arrival time is uniformly distributed between 0 and 30 minutes, what is the probability of waiting less than 5 minutes if you arrive at time 15 minutes?

    Model answer

    P(15<X<20)=20−1530−0=530=16P(15 < X < 20) = \frac{20-15}{30-0} = \frac{5}{30} = \frac{1}{6}P(15<X<20)=30−020−15​=305​=61​.

    Explanation

    For a uniform distribution, probability of an interval is proportional to its length. The PDF is 1/301/301/30, so area over 5 minutes is 5/305/305/30.

  28. 28

    What is the story of an exponential random variable?

    Model answer

    It models the time until the first success in a Poisson process, i.e., the time until the next event occurs.

    Explanation

    The exponential distribution is used for waiting times in a process where events occur continuously and independently at a constant average rate.

  29. 29

    Write the PDF of an exponential random variable with rate λ\lambdaλ.

    Model answer

    f(x)=λe−λxf(x) = \lambda e^{-\lambda x}f(x)=λe−λx for x≥0x \geq 0x≥0, and 0 otherwise.

    Explanation

    This PDF decays exponentially. The rate λ\lambdaλ is the average number of events per unit time.

  30. 30

    Write the CDF of an exponential random variable.

    Model answer

    F(x)=1−e−λxF(x) = 1 - e^{-\lambda x}F(x)=1−e−λx for x≥0x \geq 0x≥0.

    Explanation

    The CDF is obtained by integrating the PDF from 0 to xxx. It gives the probability that the waiting time is less than or equal to xxx.

  31. 31

    What are the expectation and variance of an exponential random variable?

    Model answer

    E[X]=1λE[X] = \frac{1}{\lambda}E[X]=λ1​, Var(X)=1λ2\text{Var}(X) = \frac{1}{\lambda^2}Var(X)=λ21​.

    Explanation

    Both are derived from the PDF or moment generating function. The mean is the reciprocal of the rate.

  32. 32

    How are the exponential and Poisson distributions related?

    Model answer

    Both describe events in a Poisson process: the Poisson models the number of events in a fixed time interval, while the exponential models the time between successive events.

    Explanation

    If the number of events in a time interval is Poisson with rate λt\lambda tλt, then the waiting time between events is exponential with rate λ\lambdaλ.

  33. 33

    In the earthquake example, if major earthquakes occur at a rate of 0.002 per year, what is the probability that the next earthquake occurs within 4 years?

    Model answer

    P(T<4)=1−e−0.002×4≈1−e−0.008≈0.008P(T < 4) = 1 - e^{-0.002 \times 4} \approx 1 - e^{-0.008} \approx 0.008P(T<4)=1−e−0.002×4≈1−e−0.008≈0.008.

    Explanation

    Using the exponential CDF with λ=0.002\lambda = 0.002λ=0.002 and x=4x=4x=4, we compute F(4)=1−e−λ⋅4F(4) = 1 - e^{-\lambda \cdot 4}F(4)=1−e−λ⋅4. This gives about 0.8% probability.

  34. 34

    If you want the expected number of years until the next earthquake (rate 0.002 per year), what would you compute?

    Model answer

    The expectation of the exponential is 1/λ=1/0.002=5001/\lambda = 1/0.002 = 5001/λ=1/0.002=500 years.

    Explanation

    For an exponential distribution, the mean waiting time is the reciprocal of the rate.

1 of 34
Question 1 of 34

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent