I have a question as such:
Class A has 45 students in it, and class B has 30 students in it. In class A, every student attends any particular lecture with probability 0.7 independent of the other students. For class B, two thirds of lectures are attended by everyone, with probability 1/3 that a student is missing.
Suppose you are looking for Class A, but the doors are not labelled. You open one of the two doors at random, and see 30 students. What is the probability that you opened the right door?
My work so far:
I worked out the expected value of the number of students in each class: for class $A$, it is $31.5$, and for class $B$, it is $29\frac23$. Given this, it is likelier that I have opened the wrong door - but I don't know how to work out the probabilities to arrive at a precise numerical statement. Can anyone help me out?
This drops out from a simple application of Bayes' Rule
$$ \newcommand{\pr}{\mathbb{P}} \pr(A|B) = \frac{\pr(B|A)\pr(A)}{\pr(B)} $$
Let $D_A$ be the event that you open door $A$, and let $S_A$ and $S_B$ be the numbers of students in rooms $A$ and $B$ respectively, and $S$ be the number of students in the room I'm observing. From the question, I'm assuming that $\pr(D_A) = \pr(D_B) = \frac{1}{2}$. It doesn't explicitly state that you're choosing uniformly, but it probably means that. Now, we want to evaluate our probability of success given our new information. This value is $\pr(D_A | S=30)$, so we work it out as follows:
$$ \pr(D_A | S=30) = \frac{\pr(S=30|D_A)\pr(D_A)}{\pr(S=30)} $$
Each of these quantities is more easily calculable. $\pr(S=30|D_A)$ is the probability that the number of students I observe is 30 given I have opened door A, or simply the probability that classroom A contains 30 students. $\pr(S=30)$ is the probability that the door I open contains exactly 30 students, which can be further partitioned by the events $(S_A = 30)$ and $(S_B = 30)$ to find an exact quantity. $\pr(D_A)$ is just the probability we pick door A.