I saw a question in my textbook , i have a solution for it but i am not sure.Can you corroborate my solution?
Question: Find the probability of selecting exactly two of the correct $ 6$ integers in a lottery, where the order in which these integers are selected $matter$ ,from the positive integers not exceeding $40$
NOTE: What i meant that the order is important is that assume the the winner ticket is $ 1-13-2-31-7-24 $ but your ticket is $ 1-13-2-31-24-7$ .Then you cannot take the prize because the order is important. Namely, finding the correct numbers is not sufficient , you must also find the correct order.
In this question, i am looking for the probability of the ticket which have exactly two correct number with correct place and four wrong numbers .
My solution: $ \frac{C(6,2).C(34,4)}{P(40,6)}$
I am not sure about solution.I dont know whether i should order the six number or not.What i meant is $ \frac{C(6,2).C(34,4).P(6,6)}{P(40,6)}$
Which one is correct? If none of them are correct , can you give me hints or full solution?
If I understood your question correctly, then the order of the last four numbers chosen (but not all six) should matter. After you choose which two of the six numbers will be correct in $C(6,2)$ ways, $C(34,4)$ would only choose the remaining four numbers, but you still have to count the number of ways of arranging those four numbers; thus the $C(34,4)$ should be replaced by $P(34,4)$. Then the probability would be
$$ \ \vphantom{} \\ \frac{C(6,2) \cdot P(34,4)}{P(40,6)} \\ \vphantom{} \\ $$
However, I'm not convinced the question requires the other four numbers to be wrong; couldn't some or all of the four remaining numbers be among the winning numbers but just in the wrong position? In that case the probability would be more difficult. One would have to break it down into cases to ensure the other winning numbers didn't end up in their correct spots.
As an example, suppose that other than the two correct numbers, two other winning numbers were chosen but placed in the wrong positions, and the final two numbers were not among the winning numbers. The number of ways to do that would be $C(4,2) \cdot D(4,2) \cdot P(34,2)$. Here I'm using the notation $D(n,m)$ to indicate the number of ways of placing $m$ numbers in the incorrect positions among $n$ possible positions. I know of no formula for this except for when $m=n$, in which case it's the number of derangements. In this problem the numbers are fairly small so not too difficult to calculate manually; I'm getting $D(4,2) = 7$.
So in that case, the probability would be
$$ \ \vphantom{} \\ {\small \frac{C(6,2) \big[ \, P(34,4) + C(4,1) \, D(4,1) \, P(34,3) + C(4,2) \, D(4,2) \, P(34,2) + C(4,3) \, D(4,3) \, P(34,1) + D(4,4) \, \big]} {P(40,6)}} \\ \vphantom{} \\ $$
which (if I counted the D's correctly) would become
$$ \ \vphantom{} \\ { \frac{C(6,2) \, \Big[ \, P(34,4) + 3 \, C(4,1) \, P(34,3) + 7 \, C(4,2) \, P(34,2) + 11 \, C(4,3) \, P(34,1) + 9 \, \Big]} {P(40,6)}} \\ \vphantom{} \\ $$