Probability Expectation and Varian The image attached has pr
Probability: Expectation and Varian
The image attached has problems of expectation and variance.
Find the expected number of people getting their own hats in the 4 hat experiment A computer has 4 output devices, printer, tape, disk, and terminal, which are requested with probabilities 1/12, 1/6, 5/12 and 1/3, respectively. Experiment E is : a device is requested. This experiment is performed independently by each of the 8 jobs currently in the system. Let N be the number of distinct devices requested by the 8 jobs currently in the system. Let N be the number of distinct requested by the 8 jobs. Find P^(5)(N = 4) the probability that all devices are requested. Find E(N). You have 7 keys in your pocket, one of which opens your front door. You sample them with replacement until you get in. Let W be the number of tries it takes. Find (and graph) the frequency function of W. find E(W). 10 people get in an elevator in the basement of a building that has seven floors (1-7). Each person chooses a floor; each of the choice being equally likely. Let N be the number of distinct stops they request. Find E(N). Now repeat when floor 1 is chosen with probability 1/2 each. Find the variance of N - the number of people who get their own hats - in two cases the three-hat experiment and the four-hat experiment.Solution
1)
You need to find the probability that exactly 0 people get their hats back, 1 person, 2 people, 3 people, and 4 people.
Then you sum each of those while multiplying by the probabilities.
I would start with trying to figure out the number of ways the hats can be returned...this is fairly easy:
4! = 24
although you don\'t really need the 0 hats being returned (because we\'re going to multiply by 0) it is helpful to calculate this for the others AND it\'s a good check to make sure we did things correctly.
I also believe that this is complicated to do...
you have four slots. Clearly there are three hats that you can choose to give to the first person.
But how many are left for the second slot? Are there three or two? It depends.
If you gave the first person the second person\'s hat, then you can give the second person any of the three remaining hats.
But if you did NOT give the first person the second person\'s hat, then you can only give the second person two different hats!
Then we get the same problem for the third. There are two hats left, and you can give the third person any of those two so long as either the first or second person got the third person\'s hat.
But if the first two people didn\'t get the third person\'s hat then there is only one hat left. Even worse, we still need to ensure that the 4th person doesn\'t get their hat back
So let\'s start trying to figure this out:
We can give the first person three different hats: 3
Now the question is, given three hats and three people where exactly two hats belong to two of the three people and the third hat belongs to none of them, how many ways can we get complete mismatches?
So first, the mismatched hat can go to any of the three people, so we have three people to choose from to give the \"totally wrong\" hat to.
Furthermore, there is exactly one person who it doesn\'t matter WHICH hat they get (i.e. their hat was given to the first person).
There is exactly one case where we give the mismatched hat to this person, then the last two must simply swap hats--that\'s one case.
Then there are two more cases where we give the mismatched hat to one of the people who\'s hats ARE still in the pile. Again, in each of these two cases, there is only one hat left for the \"other\" person.
This gives 3 * (1 + 2) = 3*3 = 9 cases for mismatches (from a total of 24)....we should probably check with the formula given:
b_n(0) = n!(-1)^i/i! = 4! * (1 - 1 + 1/2 - 1/6 + 1/24) = 12 - 4 + 1 = 9
Now for exactly one correct:
The next ones will be slightly easier (although still somewhat difficult). If exactly one person gets their hat back, then it\'s simple: choose the person (4 C 1) = 4 and for each of those 4, find the number of ways to get complete mismatches for 3 hats!
0 mismatches for 3 hats: Similar reasoning to the above. Choose two hats for the first person, and that\'s it! One of the remaining two people\'s hats MUST be left and thus must be given to the other. There are only two ways to get complete mismatches for 3 hats...again we can check:
b_3(0) = 3! * (1 - 1 + 1/2 - 1/6) = 3 - 1 = 2
So multiply by the four ways to choose the one correct person: 4*2 = 8 ways to get exactly 1 correct.
Exactly 2 correct:
Choose the two correct people: (4 C 2) = 6. Now find the number of ways to get a complete mismatch from two people...really easy, there\'s only 1--they swap hats. So there are 6 ways to do this.
Exactly 3 correct (impossible--think about it):
Choose the three correct people: (4 C 3) = 4. Now how many ways can you get a mismatch with only 1 person left? You can\'t, right? Therefore it\'s 4*0 = 0 <-- there is NO WAY to get exactly 3 matches.
Exactly 4 correct: obviously there is only one way.
Let\'s make sure these add up to 24:
9 + 8 + 6 + 1 = 24,
So now it\'s easy just compute the expected value:
0 * 9/24 + 1 * 8/24 + 2 * 6/24 + 3 * 0 + 4 * 1/24 = 1/3 + 1/2 + 1/6 = (2 + 3 + 1) / 6 = 6/6 = 1
So the expected number of correct hats returned would be 1.
2) Let us first find out E[X] = # of devices NOT requested for.
define the indicator variable
Xi = 1 if the ith device is not asked for and 0 otherwise
by linearity of expectation we have E(# of devices not asked for) = E(Xi) = E(Xi)
the expectation of an indicator random variable is just the probability of the event it indicates, so E(Xi) = P(i th device not asked for) ,
and E(# of devices not asked for ) = E(Xi) = (11/12)8 + (5/6)8 + (7/12)8 + (2/3)8 = 0.7835
3)
There are 7 keys to opens front door.
W be the number of tries it takes.
each key with probability 1/7.
the probability distribution of W is,
Expected value of W is 4.
| w | P(w) | w*P(w) |
| 1 | 1|7 | 0.142857 |
| 2 | 1|7 | 0.285714 |
| 3 | 1|7 | 0.428571 |
| 4 | 1|7 | 0.571429 |
| 5 | 1|7 | 0.714286 |
| 6 | 1|7 | 0.857143 |
| 7 | 1|7 | 1 |
| total | 1 | 4 |


