Flipping a Coin a Random Number of Times
In this problem, we're looking at a two stage process in which the first stage, we roll a fair die which has four faces to obtain a number N, where N belongs to the set 0, 1, 2, and 3 with equal probability. Now, given the result of the die roll, N will toss a fair coin N times in getting K heads from the coin tosses. For instance, if from the first die roll, we get N equal to 3, then we'll toss a coin 3 times. Let's say the outcome is heads, heads, and tails. And that will give us K equal to 2. For part A, we're asked to compute the PMF for N, which is a result of the first die roll. Now, since we had assumed the die roll was uniformly distributed in the set in the set 0, 1, 2, and 3, we have that the chance of N being equal to any little n is equal to 1/4 if n is in the set 0, 1, 2, 3, and 0 otherwise. If we were to plot this in a figure, we'll have the following plot. For part B, things are getting a little more complicated. This time, we want...