Skip to main content

[Community Question] Statistics: finding variance and mean of guests who got the correct key for their room

One of our user asked:

i have a problem with a quite complicated question regarding guests who visit a hotel and hopefuly getting a correct key for their room:

problem: 2n people, n pairs, arrive to an hotel. each pair is assured to obtain a shared room at the hotel. however, the receptionist is a bit confused and hands out, randomly, 2n keys. for each of the n rooms there are 2 identical keys(out of 2n) that open its door.

let X - number of guests who obtained a correct key for their room.

Y - number of guests that can enter to that shared room, meaning number of pairs in which at least one of the people got the correct key to the room.

calculate mean and variance of X and the mean of Y.

what i tried to do: i declared an indicator $x_i$ that is 1 if the i guest got the correct key, and 0 if he doesn't, for each of i=1,...,2n keys available. next, i calculated the mean of $E[X_i]=P(x_i=1)=\frac{\binom21}{\binom{2n}1}=\frac{1}{n}$. the variance is $var(X_i)=P(x_i=1)P(X_i=0)$. then, well, then i am lost. i think i should define two variables that represent whether i, j are pairs or not and somehow calculate the covariance, but i don't know how and it's quite complicated.

i am wondering, is there any smart way to approach it and solve it without tedious computations? would really appreciate an answer in simple terms so i could learn from it and improve.

thank you very much for helping me


Comments

Popular posts from this blog

[Community Question] Calculus: calculating 2 constants in a function

One of our user asked: $$M=\{f\in C[0,2\pi],\int_{0}^{2\pi}f(x)sinxdx=\pi,\int_{0}^{2\pi}f(x)sin2xdx=2\pi\} $$ $a,b\in \mathbb R, g\in M, g(x)=asinx+bsin2x,x\in [0,2\pi]$ I've read on the answers that $a=1,b=2$ and I don't know how to calculate them. Can somebody explain me,please? By the way, the problem is to determine $ \int_{0}^{2\pi}(g(x))^2 dx$ so you have to first get the constants $a$ and $b$ .

Calculus: A difficulty in understanding a step in a solution.

Here is the solution: But I could not understand how the last term in the fourth line came from the line before it, could anyone explain this for me please?