1. Home
  2. Explore
  3. Computer Science
  4. Probability and Federalist Papers

Study methods

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

Probability and Federalist Papers

  • 15Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Normal Distribution

What is the formula for the cumulative distribution function (CDF) of a normal random variable XXX with mean μ\muμ and variance σ2\sigma^2σ2?

15 questions

  1. 1

    What is the formula for the cumulative distribution function (CDF) of a normal random variable XXX with mean μ\muμ and variance σ2\sigma^2σ2?

    1. A

      P(X<x)=Φ(x−μσ)P(X < x) = \Phi\left(\frac{x - \mu}{\sigma}\right)P(X<x)=Φ(σx−μ​)

    2. B

      P(X<x)=Φ(x−σμ)P(X < x) = \Phi\left(\frac{x - \sigma}{\mu}\right)P(X<x)=Φ(μx−σ​)

    3. C

      P(X<x)=Φ(x−μσ2)P(X < x) = \Phi\left(\frac{x - \mu}{\sigma^2}\right)P(X<x)=Φ(σ2x−μ​)

    4. D

      P(X<x)=Φ(μ−xσ)P(X < x) = \Phi\left(\frac{\mu - x}{\sigma}\right)P(X<x)=Φ(σμ−x​)

    Correct answer
    A

    P(X<x)=Φ(x−μσ)P(X < x) = \Phi\left(\frac{x - \mu}{\sigma}\right)P(X<x)=Φ(σx−μ​)

    Explanation

    The correct formula is P(X<x)=Φ(x−μσ)P(X < x) = \Phi\left(\frac{x - \mu}{\sigma}\right)P(X<x)=Φ(σx−μ​), where Φ\PhiΦ is the CDF of the standard normal distribution.

  2. 2

    What does the function Φ\PhiΦ represent in the context of a normal distribution?

    1. A

      The probability mass function of a normal

    2. B

      The cumulative distribution function of a standard normal

    3. C

      The probability density function of a standard normal

    4. D

      The inverse cumulative distribution function of a standard normal

    Correct answer
    B

    The cumulative distribution function of a standard normal

    Explanation

    Φ\PhiΦ is the CDF of the standard normal distribution, i.e., Φ(z)=P(Z≤z)\Phi(z) = P(Z \leq z)Φ(z)=P(Z≤z) where ZZZ is standard normal.

  3. 3

    If Φ−1(0.99999)≈3.71902\Phi^{-1}(0.99999) \approx 3.71902Φ−1(0.99999)≈3.71902, what is the value rrr such that P(X<r)=0.99999P(X < r) = 0.99999P(X<r)=0.99999 for a normal XXX with mean 1,000,0001,000,0001,000,000 and standard deviation 10,00010,00010,000?

    1. A

      1,037,190.21,037,190.21,037,190.2

    2. B

      1,037,1901,037,1901,037,190

    3. C

      1,000,000×3.71902=3,719,0201,000,000 \times 3.71902 = 3,719,0201,000,000×3.71902=3,719,020

    4. D

      1,000,000+3.71902×10,000=1,037,190.21,000,000 + 3.71902 \times 10,000 = 1,037,190.21,000,000+3.71902×10,000=1,037,190.2

    Correct answer
    D

    1,000,000+3.71902×10,000=1,037,190.21,000,000 + 3.71902 \times 10,000 = 1,037,190.21,000,000+3.71902×10,000=1,037,190.2

    Explanation

    Using r=μ+Φ−1(p)σr = \mu + \Phi^{-1}(p) \sigmar=μ+Φ−1(p)σ, with μ=1,000,000\mu=1,000,000μ=1,000,000, σ=10,000\sigma=10,000σ=10,000, p=0.99999p=0.99999p=0.99999, we get r=1,000,000+3.71902×10,000=1,037,190.2r=1,000,000 + 3.71902 \times 10,000 = 1,037,190.2r=1,000,000+3.71902×10,000=1,037,190.2.

  4. 4

    In the server capacity problem, why is the number of servers computed as ⌈r/10000⌉\lceil r / 10000 \rceil⌈r/10000⌉ rather than exactly r/10000r/10000r/10000?

    1. A

      Because servers can only handle integer numbers of requests

    2. B

      Because the number of servers must be an integer and we need to handle at least rrr requests

    3. C

      Because the CDF formula requires integer inputs

    4. D

      Because we need to ensure the probability is strictly greater than 0.99999

    Correct answer
    B

    Because the number of servers must be an integer and we need to handle at least rrr requests

    Explanation

    We need at least rrr requests capacity, and since each server handles 10,000 requests, we take the ceiling of r/10000r/10000r/10000 to ensure we have enough capacity.

  5. 5

    What property must a joint probability mass function pX,Y(x,y)p_{X,Y}(x,y)pX,Y​(x,y) satisfy?

    1. A

      Each entry is between 0 and 1

    2. B

      All entries sum to 1

    3. C

      Columns sum to 1

    4. D

      Rows sum to 1

    Correct answer
    B

    All entries sum to 1

    Explanation

    The sum of all joint probabilities over all combinations of XXX and YYY must equal 1, as they cover all possible outcomes.

  6. 6

    If you have a joint PMF table for two random variables, how can you compute the marginal probability P(X=a)P(X = a)P(X=a)?

    1. A

      Sum over all xxx of pX,Y(x,a)p_{X,Y}(x, a)pX,Y​(x,a)

    2. B

      Multiply all entries in row aaa

    3. C

      Take the entry pX,Y(a,a)p_{X,Y}(a, a)pX,Y​(a,a)

    4. D

      Sum over all yyy of pX,Y(a,y)p_{X,Y}(a, y)pX,Y​(a,y)

    Correct answer
    D

    Sum over all yyy of pX,Y(a,y)p_{X,Y}(a, y)pX,Y​(a,y)

    Explanation

    Marginalization sums out the other variable: P(X=a)=∑ypX,Y(a,y)P(X=a) = \sum_y p_{X,Y}(a, y)P(X=a)=∑y​pX,Y​(a,y).

  7. 7

    Why is marginalization referred to as 'marginal'?

    1. A

      Because it is of minor importance

    2. B

      Because it deals with marginal probabilities

    3. C

      Because the results are written in the margins of the table

    4. D

      Because it involves the law of total probability

    Correct answer
    C

    Because the results are written in the margins of the table

    Explanation

    Historically, probabilities were summed and written in the margins of the joint table, leading to the term 'marginal'.

  8. 8

    How many entries would a joint probability table have for 10 random variables each taking 5 values?

    1. A

      10×510 \times 510×5

    2. B

      10510^5105

    3. C

      5×105 \times 105×10

    4. D

      5105^{10}510

    Correct answer
    D

    5105^{10}510

    Explanation

    With 10 variables each with 5 outcomes, the total number of combinations is 5105^{10}510, which is exponentially large.

  9. 9

    What is the formula for the multinomial probability mass function?

    1. A

      ∏i=1Mn!ci!pici\prod_{i=1}^M \frac{n!}{c_i!} p_i^{c_i}∏i=1M​ci​!n!​pici​​

    2. B

      n!∑i=1Mci!∏i=1Mpici\frac{n!}{\sum_{i=1}^M c_i!} \prod_{i=1}^M p_i^{c_i}∑i=1M​ci​!n!​∏i=1M​pici​​

    3. C

      n!∏i=1Mci!∏i=1Mpici\frac{n!}{\prod_{i=1}^M c_i!} \prod_{i=1}^M p_i^{c_i}∏i=1M​ci​!n!​∏i=1M​pici​​

    4. D

      n!∏i=1Mci!∑i=1Mpici\frac{n!}{\prod_{i=1}^M c_i!} \sum_{i=1}^M p_i^{c_i}∏i=1M​ci​!n!​∑i=1M​pici​​

    Correct answer
    C

    n!∏i=1Mci!∏i=1Mpici\frac{n!}{\prod_{i=1}^M c_i!} \prod_{i=1}^M p_i^{c_i}∏i=1M​ci​!n!​∏i=1M​pici​​

    Explanation

    The multinomial PMF is n!c1!c2!⋯cM!p1c1p2c2⋯pMcM\frac{n!}{c_1! c_2! \cdots c_M!} p_1^{c_1} p_2^{c_2} \cdots p_M^{c_M}c1​!c2​!⋯cM​!n!​p1c1​​p2c2​​⋯pMcM​​.

  10. 10

    In the multinomial distribution, what must be true about the sum of the probabilities pip_ipi​?

    1. A

      They sum to 1

    2. B

      They sum to nnn

    3. C

      They are each greater than 0.5

    4. D

      They are all equal

    Correct answer
    A

    They sum to 1

    Explanation

    The probabilities pip_ipi​ for each outcome must sum to 1, as they represent the full set of possibilities for a single trial.

  11. 11

    How does the multinomial distribution generalize the binomial distribution?

    1. A

      It allows more than one trial

    2. B

      It allows dependent trials

    3. C

      It allows continuous outcomes

    4. D

      It allows more than two outcome categories

    Correct answer
    D

    It allows more than two outcome categories

    Explanation

    The binomial has two outcomes (success/failure), while the multinomial extends to MMM outcomes.

  12. 12

    In using the multinomial to model text, what does each 'trial' represent?

    1. A

      Each word in the document

    2. B

      Each sentence

    3. C

      Each letter

    4. D

      Each document

    Correct answer
    A

    Each word in the document

    Explanation

    Each word is considered a trial, with outcomes being the word types, and the counts follow a multinomial distribution.

  13. 13

    When applying Bayes' theorem to determine authorship of the Federalist Papers, what is the expression for the ratio P(Hamilton∣document)P(Madison∣document)\frac{P(\text{Hamilton}|\text{document})}{P(\text{Madison}|\text{document})}P(Madison∣document)P(Hamilton∣document)​?

    1. A

      P(document∣Hamilton)P(document∣Madison)⋅P(document)\frac{P(\text{document}|\text{Hamilton})}{P(\text{document}|\text{Madison})} \cdot P(\text{document})P(document∣Madison)P(document∣Hamilton)​⋅P(document)

    2. B

      P(document∣Hamilton)−P(document∣Madison)P(\text{document}|\text{Hamilton}) - P(\text{document}|\text{Madison})P(document∣Hamilton)−P(document∣Madison)

    3. C

      P(document∣Hamilton)P(document∣Madison)⋅P(Hamilton)P(Madison)\frac{P(\text{document}|\text{Hamilton})}{P(\text{document}|\text{Madison})} \cdot \frac{P(\text{Hamilton})}{P(\text{Madison})}P(document∣Madison)P(document∣Hamilton)​⋅P(Madison)P(Hamilton)​

    4. D

      P(Hamilton)P(Madison)⋅P(document)\frac{P(\text{Hamilton})}{P(\text{Madison})} \cdot P(\text{document})P(Madison)P(Hamilton)​⋅P(document)

    Correct answer
    C

    P(document∣Hamilton)P(document∣Madison)⋅P(Hamilton)P(Madison)\frac{P(\text{document}|\text{Hamilton})}{P(\text{document}|\text{Madison})} \cdot \frac{P(\text{Hamilton})}{P(\text{Madison})}P(document∣Madison)P(document∣Hamilton)​⋅P(Madison)P(Hamilton)​

    Explanation

    By Bayes' theorem, P(author∣doc)∝P(doc∣author)P(author)P(\text{author}|\text{doc}) \propto P(\text{doc}|\text{author})P(\text{author})P(author∣doc)∝P(doc∣author)P(author), so the ratio is the product of the likelihood ratio and the prior ratio.

  14. 14

    In the authorship problem, why did the direct computation of P(document∣author)P(\text{document}|\text{author})P(document∣author) yield zero for both authors?

    1. A

      Because the document contained unknown words

    2. B

      Because the probabilities multiplied together were too small for computer precision (underflow)

    3. C

      Because the authors did not write the document

    4. D

      Because the multinomial coefficient was zero

    Correct answer
    B

    Because the probabilities multiplied together were too small for computer precision (underflow)

    Explanation

    The product of many small probabilities (for each word) causes numerical underflow, resulting in zero in floating-point arithmetic.

  15. 15

    What common technique is used to avoid underflow when computing probabilities in text analysis?

    1. A

      Rounding probabilities to 0 or 1

    2. B

      Normalizing the document length

    3. C

      Using higher precision arithmetic

    4. D

      Using logarithms of probabilities

    Correct answer
    D

    Using logarithms of probabilities

    Explanation

    Working with log probabilities converts products into sums, avoiding underflow and allowing accurate comparison.

Question 1 of 15
Question 1 of 15

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent