Amy in a New Town

6.0 points possible (graded, results hidden)

Amy immigrated to a new city, and would like to make friends with her new neighbours.

On any particular day 2, she feels shy with probability 1p (0<p<1) and stays home; or, with probability p, she goes out and visits the -th house in her neighborhood. At any house that she visits, either:

(1) someone is at the house and answers the door, this happens with probability q (where 0<< 1). in that case, Amy shows them a picture of her hometown;

(ii) no one is at the house and Amy returns home.

We assume that the collection of all events of the form (Amy stays home on day ) and (Someone is at the 1-th house on day 1), for 11,2,..., are (mutually) independent.

1. What is the probability that Amy gives out a picture on the first day?

2. Fix some integers k and 12, with 111 and 0<k<n

What is the probability that she gave out exactly k pictures on the first 71 days?

(Enter factorials by typing for example fact(n) for 121. Do not worry if the parser does not display correctly, the grader will work independently. For proper display, enclose any factorial by parentheses, e.g. (fact(n)).)

3. What is the probability that she stayed home on day 1, given that she did not give out a picture on that day?

4. Within the first week (7 days), what is the probability that there were no days in which Amy went out but did not give out a picture of her hometown?

Clarification: What is the probability that there were no days in event A happens, where event A is that Amy went out but did not give out a picture of her hometown?.

1 answer

To solve each of your questions, we need to set up the probabilities correctly based on the problem statement.

  1. What is the probability that Amy gives out a picture on the first day?

    The probability that Amy goes out on the first day is \( p \), and the probability that someone is at the house (after she decides to go out) is \( q \). Therefore, the probability that she gives out a picture on the first day (goes out and someone is there) is: \[ P(\text{gives out picture on day 1}) = p \cdot q \]

  2. What is the probability that she gave out exactly k pictures on the first n days?

    We can treat each day's event of giving out a picture as a Bernoulli trial: she has a probability \( p \cdot q \) of giving out a picture and a probability \( 1 - pq \) of not giving it out. The random variable for the number of pictures given out follows a binomial distribution:

    Thus, the probability that she gives out exactly k pictures in n days is given by: \[ P(X = k) = \binom{n}{k} (pq)^k (1 - pq)^{n-k} \]

    Where \( \binom{n}{k} \) is the binomial coefficient, representing "n choose k".

  3. What is the probability that she stayed home on day 1, given that she did not give out a picture on that day?

    We need to use Bayes' theorem for this conditional probability. Define:

    • \( H \): the event that Amy stayed home on day 1.
    • \( N \): the event that Amy did not give out a picture on day 1.

    We want to find \( P(H | N) \).

    By Bayes' theorem, we have: \[ P(H | N) = \frac{P(N | H)P(H)}{P(N)} \]

    Where:

    • \( P(H) = 1 - p \) (the probability she stayed home).
    • \( P(N | H) = 1 \) (if she stayed home she definitely did not give out a picture).
    • \( P(N) = P(N | H) P(H) + P(N | G) P(G) \)
      • \( G \): the event that she goes out on day 1.
      • \( P(N | G) = (1-q) \).
      • \( P(G) = p \).

    Therefore, \[ P(N) = (1)(1 - p) + (1 - q)p = (1 - p) + p(1 - q) = 1 - p + p - pq = 1 - pq \]

    Putting it into Bayes' theorem, \[ P(H | N) = \frac{(1)(1 - p)}{1 - pq} = \frac{1 - p}{1 - pq} \]

  4. Within the first week (7 days), what is the probability that there were no days in which Amy went out but did not give out a picture of her hometown?

    The event "she went out but did not give out a picture" happens if she goes out (with probability \( p \)) and no one is home (with probability \( 1 - q \)). The probability of this happening on any given day is \( p(1 - q) \).

    We are interested in the probability that this does not happen at all in a week (7 days). Therefore, the probability that she either stays home or gives out a picture on any given day is: \[ 1 - p(1 - q) \]

    For 7 days, the probability that this condition is not met any day is: \[ \left(1 - p(1 - q)\right)^7 \]

    Therefore, the final answer for this part is: \[ P(\text{no days went out but did not give out}) = (1 - p(1 - q))^7 \]

Summarizing the answers:

  1. \( p \cdot q \)
  2. \( \binom{n}{k} (pq)^k (1 - pq)^{n-k} \)
  3. \( \frac{1 - p}{1 - pq} \)
  4. \( (1 - p(1 - q))^7 \)