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

  • 18Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Normal Distribution Review
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • β†’Next card

What is the formula for computing P(X<x)P(X < x)P(X<x) when XXX is a normal random variable with mean ΞΌ\muΞΌ and variance Οƒ2\sigma^2Οƒ2?

Tap to flipClick to flipspace

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.

Or swipe the card

18 cards

  1. What is the formula for computing P(X<x)P(X < x)P(X<x) when XXX is a normal random variable with mean ΞΌ\muΞΌ and variance Οƒ2\sigma^2Οƒ2?

    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.

  2. What is the inverse Phi function and how is it used?

    The inverse Phi function Ξ¦βˆ’1(p)\Phi^{-1}(p)Ξ¦βˆ’1(p) returns the zzz such that Ξ¦(z)=p\Phi(z) = pΞ¦(z)=p. It is used to find quantiles of a normal distribution, e.g., solving P(X<r)=0.99999P(X < r) = 0.99999P(X<r)=0.99999 yields r=ΞΌ+Οƒβ‹…Ξ¦βˆ’1(0.99999)r = \mu + \sigma \cdot \Phi^{-1}(0.99999)r=ΞΌ+Οƒβ‹…Ξ¦βˆ’1(0.99999).

  3. Why do computer scientists often work with log-probabilities instead of raw probabilities?

    Multiplying many small probabilities causes underflow in computers. Adding log-probabilities avoids this because log⁑(ab)=log⁑a+log⁑b\log(ab) = \log a + \log blog(ab)=loga+logb, and the sum stays in a representable range.

  4. What is the number of ways to order nnn objects where there are n1n_1n1​ of type 1, n2n_2n2​ of type 2, ..., nrn_rnr​ of type rrr?

    n!n1!n2!β‹―nr!\frac{n!}{n_1! n_2! \cdots n_r!}n1​!n2​!β‹―nr​!n!​ This is the multinomial coefficient, also used for counting permutations of multiset (like the word 'Mississippi').

  5. Define the joint probability mass function (joint PMF) of two discrete random variables XXX and YYY.

    The joint PMF is pX,Y(x,y)=P(X=xΒ andΒ Y=y)p_{X,Y}(x,y) = P(X = x \text{ and } Y = y)pX,Y​(x,y)=P(X=xΒ andΒ Y=y). It gives the probability that XXX takes value xxx and YYY takes value yyy simultaneously.

  6. What does a single cell in a joint probability table represent?

    Each cell gives the probability of a specific joint assignment: P(X=xi,Y=yj)P(X = x_i, Y = y_j)P(X=xi​,Y=yj​).

  7. Why must all entries in a joint probability table sum to 1?

    Because the cells represent mutually exclusive events that cover all possible outcomes of the two random variables, so their probabilities must sum to 1.

  8. What is marginalization and how is it performed?

    Marginalization extracts the probability distribution of one random variable by summing the joint PMF over all values of the other variable(s). For example, P(X=a)=βˆ‘yP(X=a,Y=y)P(X = a) = \sum_{y} P(X = a, Y = y)P(X=a)=βˆ‘y​P(X=a,Y=y).

  9. How is the law of total probability related to marginalization?

    Marginalization is a direct application of the law of total probability: P(X=a)=βˆ‘yP(X=a∣Y=y)P(Y=y)=βˆ‘yP(X=a,Y=y)P(X = a) = \sum_{y} P(X = a | Y = y) P(Y = y) = \sum_{y} P(X = a, Y = y)P(X=a)=βˆ‘y​P(X=a∣Y=y)P(Y=y)=βˆ‘y​P(X=a,Y=y).

  10. What is the curse of dimensionality in the context of joint probability tables?

    The number of entries in a joint table grows exponentially with the number of random variables. For kkk variables with mmm values each, the table has mkm^kmk entries, making it infeasible for large kkk.

  11. What is the multinomial distribution?

    The multinomial distribution models the counts of mmm possible outcomes when nnn independent trials (like dice rolls) are performed, where each trial has outcome probabilities p1,p2,...,pmp_1, p_2, ..., p_mp1​,p2​,...,pm​ summing to 1.

  12. Write the probability mass function (PMF) of the multinomial distribution.

    P(C1=c1,...,Cm=cm)=n!c1!β‹―cm!p1c1β‹―pmcmP(C_1 = c_1, ..., C_m = c_m) = \frac{n!}{c_1! \cdots c_m!} p_1^{c_1} \cdots p_m^{c_m}P(C1​=c1​,...,Cm​=cm​)=c1​!β‹―cm​!n!​p1c1​​⋯pmcm​​ where βˆ‘i=1mci=n\sum_{i=1}^m c_i = nβˆ‘i=1m​ci​=n and βˆ‘i=1mpi=1\sum_{i=1}^m p_i = 1βˆ‘i=1m​pi​=1.

  13. How is the binomial distribution a special case of the multinomial?

    For m=2m=2m=2 outcomes (e.g., success/failure), the multinomial PMF reduces to the binomial: (nk)pk(1βˆ’p)nβˆ’k\binom{n}{k} p^k (1-p)^{n-k}(kn​)pk(1βˆ’p)nβˆ’k, where c1=kc_1 = kc1​=k, c2=nβˆ’kc_2 = n-kc2​=nβˆ’k, p1=pp_1 = pp1​=p, p2=1βˆ’pp_2 = 1-pp2​=1βˆ’p.

  14. How can a multinomial model be used for text analysis?

    Treat each word in a document as an independent draw from a vocabulary of mmm words, with probabilities p1,...,pmp_1, ..., p_mp1​,...,pm​ reflecting word frequencies. The counts of each word in the document follow a multinomial distribution.

  15. In the Federalist Papers authorship problem, how is Bayes' theorem used to compute P(author∣document)P(\text{author} | \text{document})P(author∣document)?

    P(H∣D)=P(D∣H)P(H)P(D)P(H | D) = \frac{P(D | H) P(H)}{P(D)}P(H∣D)=P(D)P(D∣H)P(H)​ where P(D∣H)P(D | H)P(D∣H) is the multinomial likelihood of the document given Hamilton wrote it, P(H)P(H)P(H) is the prior probability, and P(D)P(D)P(D) is the marginal probability of the document.

  16. How can the ratio P(H∣D)P(M∣D)\frac{P(H | D)}{P(M | D)}P(M∣D)P(H∣D)​ be simplified to avoid computing P(D)P(D)P(D)?

    P(H∣D)P(M∣D)=P(D∣H)P(H)P(D∣M)P(M)\frac{P(H | D)}{P(M | D)} = \frac{P(D | H) P(H)}{P(D | M) P(M)}P(M∣D)P(H∣D)​=P(D∣M)P(M)P(D∣H)P(H)​ If P(H)=P(M)=0.5P(H) = P(M) = 0.5P(H)=P(M)=0.5, then the ratio simplifies to P(D∣H)P(D∣M)\frac{P(D | H)}{P(D | M)}P(D∣M)P(D∣H)​.

  17. Why does the multinomial coefficient cancel when comparing two authors for the same document?

    Because the multinomial coefficient depends only on the word counts in the document, which are the same regardless of the author. So it appears in both P(D∣H)P(D | H)P(D∣H) and P(D∣M)P(D | M)P(D∣M) and cancels in the ratio.

  18. What problem occurs when a word that appears in the unknown document never appeared in the known works of an author?

    The estimated probability of that word given the author becomes zero, making the entire likelihood zero, even if other evidence strongly favors that author. This is a common issue with maximum likelihood estimates from limited data.

Card 1 of 18
Card 1 of 18

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent