Chapter 7: Discrete Probability
Q20E
Question: Would we reject a message as spam in Example 4
a) using just the fact that the word “undervalued” occurs in the message?
b) using just the fact that the word “stock” occurs in the message?
Q20E
Question: What is the probability that a five-card poker hand contains a royal flush, that is, the , jack, queen, king and ace of one suit.
Q20SE
Question: What is the probability that a randomly selected bit string of length \(11\) is a palindrome?
Q21E
To determine the smallest number of people you need to choose at random so that the probability that at least two of them were both born on April exceeds.
Q21E
Question: Suppose that a Bayesian spam filter is trained on a set of 10,000 spam messages and 5000 messages that are not spam. The word “enhancement” appears in 1500 spam messages and 20 messages that are not spam, while the word “herbal” appears in 800 spam messages and 200 messages that are not spam. Estimate the probability that a received message containing both the words “enhancement” and “herbal” is spam. Will the message be rejected as spam if the threshold for rejecting spam is 0.9?
Q21E
Question: What is the expected value of the sum of the numbers appearing on two fair dice when they are rolled given that the sum of these numbers is at least nine. That is, what is \(E(X|A) \)where X is the sum of the numbers appearing on the two dice and A is the event that\(X \ge 9\)?
Q21E
Question: What is the probability that a fair die never comes up an even number when it is rolled six times?
Q21SE
Question: Consider the following game. A person flips a coin repeatedly until a head comes up. This person receives a payment of \({2^n}\) dollars if the first head comes up at the \(nth\) flip.
a) Let \(X\) be a random variable equal to the amount of money the person wins. Show that the expected value of \(X\) does not exist (that is, it is infinite). Show that a rational gambler, that is, someone willing to pay to play the game as long as the price to play is not more than the expected payoff, should be willing to wager any amount of money to play this game. (This is known as the St. Petersburg paradox. Why do you suppose it is called a paradox?)
b) Suppose that the person receives \({2^n}\) dollars if the first head comes up on the \(nth\) flip where \(n < 8\) and \({2^8} = 256\) dollars if the first head comes up on or after the eighth flip. What is the expected value of the amount of money the person wins? How much money should a person be willing to pay to play this game?
Q22E
Question: Prove the law of total expectations.
Q22E
Question: Suppose that we have prior information concerning whether a random incoming message is spam. In particular, suppose that over a time period, we find that s spam messages arrive and h messages arrive that are not spam.
a) Use this information to estimate p(S), the probability that an incoming message is spam, and\(p(\bar S)\), the probability an incoming message is not spam.
b) Use Bayes’ theorem and part (a) to estimate the probability that an incoming message containing the word w is spam, where p(w)is the probability that w occurs in a spam message and q(w) is the probability that w occurs in a message that is not spam.