Probability - Find the mean of a random variable

109 Views Asked by At

Hi I'm doing my probability homework and seeking help for some questions.

Suppose you are operating a snack store. You would like to offer a promotion for the coming summer. Your idea for the promotion is bundling two snacks together and allow customers to buy two snacks at a time for the cost of one. Suppose there are 100000 snacks in your store. All snacks are indexed by a unique integer id [0,99999]. Assume that the price of each snack is uniformly distributed in {18, 19, 20, 21, 22}. The price of each snack is independent of each other. In order to reduce the cost, you decide that you will only bundle snacks if the sum of their prices is 39 or less. Suppose you pick two snacks at random and check the sum of their prices.

Here is the question:

Let N be the number of snacks accessed in order to pick two snacks such that the sum of their prices is 39 or less. Identify the distribution of N as a distribution known in class. Find the expected value of N.

I think N means at how many times can we get 2 snacks with sum of prices less than or equal to 39? So it should be geometric distribution, but how to find the mean?

1

There are 1 best solutions below

0
On

Assuming you mean N denotes no. of pairs we pick such that the last pair is the first pair whose value is 39 or less.

Since no. of snacks is finite, whenever we pick a snack the with value $x$ the probability of getting $x$ changes. However we neglect that as no. of snacks is very large.

Possible price of snacks : ${18,19,20,21,22}$

Possible pairs : ${5\choose2}=10$

Pairs with sum of prices $<=39$ = ${(18,19),(18,20),(18,21),(19,20)}$, 4 Pairs

In each trial, we either succeed: get a pair whose value is 39 or less, or fail. Therefore is trial a Bernoulli Trial with probability of success $p = 4/10$ . The $pmf$ of $N$, that is first success, is Geometric with parameter $p$.

$$P(N=n) = (1-p)^{n-1} *p$$ For $E(N)$ we apply a small trick:

$$E(N)= p.1+(1-p)*(1+E(N))$$ Justification: We can have success in the first trial with probability $p$. We may fail the first trial with probability $(1-p)$. If we succeed in the first trial, N=1. If we fail in the first trial, since, Geometric distribution is memoryless, distribution of the no. of trials till we get the first success does not change, hence, $No.\ of\ trials = 1 + N$.

Reducing $$E(N)=p*1+(1-p)*(1+E(N))$$ we get $E(N)=1/p$.

Therefore Mean of the distribution = $E(N) = 1/p$. Putting $p=4/10$, $E(N)=10/4$, and $pmf(N=n) = 0.6^{n-1}*0.4$.