We have two options for serving ads within Newsfeed: 1 – out of every 25 stories, one will be an ad 2 – every story has a 4% chance of being an ad For each option, what is the expected number of ads shown in 100 news stories? If we go with option 2, what is the chance a user will be shown only a single ad in 100 stories? What about no ads at all?
The expected number of ads shown in 100 new stories for option 1 is equal to 4 (100/25 = 4).
Similarly, for option 2, the expected number of ads shown in 100 new stories is also equal to 4 (4/100 = 1/25 which suggests that one out of every 25 stories will be an ad, therefore in 100 new stories there will be 4 ads)
Therefore for each option, the total number of ads shown in 100 new stories is 4.
The second part of the question can be solved by using Binomial distribution. Binomial distribution takes three parameters:
The probability of success and failure, which in our case is 4%.
The total number of cases, which is 100 in our case.
The probability of the outcome, which is a chance that a user will be shown only a single ad in 100 stories
p(single ad) = (0.96)^99*(0.04)^1