I'm creating a Casino game for math class. My game's rules are, the dealer deals one "community" card and one house card. Players can bet on the community card being higher, lower, or the same as the house card but I'm having trouble finding the probability of the cards being higher or lower.
This is the equation I used to come up with an answer:
$$ P(\text{Same value}) = \frac{3}{52} = 5.7\% $$
$$ P(\text{Higher}) = \frac{(100 - P(\text{Same value}))}{2} = 47.15\% $$
When I think about it though, I'm not sure whether or not drawing the first card would affect the outcome.
First, as Math Lover noted, the probability for drawing the same value should be $\frac{3}{51}$, since you've already drawn the first card. The numerator decreases to 3, since 3 of that first card remain in the deck, and the denominator decreases to 51, since there are 51 total cards remaining in the deck.
As for the second question, your approach works because there's an equal probability for each possible first card drawn. The probability of higher/lower will change if you know what card is drawn, but if you don't know, then the probabilities average out because you're just as likely to draw a high card as a low card first.
Let $X_1$ represent the first card drawn, and $X_2$ the second, and let $x$ represent the observed value of $X_1$, where $x = 1$ is the lowest possible card value (A or 2, typically), and $x = 13$ the highest possible card value (K or A, typically).
Now, once we've observed $x$, we also know that there are $4(x-1)$ cards with a lower value and $4(13-x)$ cards with a higher value. Then, we have the following:
$$ P[X_2 > x] = \frac{4(13-x)}{51} , $$ $$ P[X_2 < x] = \frac{4(x-1)}{51} . $$
These two values obviously aren't the same, so the probability of higher/lower depends on that first draw. If $x$ is a low card, then the probability of a higher card on the second draw is higher. Similarly, if $x$ is a high card, then the probability of a higher card on the second draw is lower.
Now, prior to that first draw, we have to allow for all possible values it could be. We do this by summing over all possible outcomes for that first draw (using the Law of Total Probability):
$$ P[X_2 < X_1] = \sum_{x=1}^{13} {\left(P[X_2 < X_1 | X_1 = x]*P[X_1 = x]\right)} $$ $$ = \sum_{x=1}^{13} {\left(P[X_2 < x]*P[X_1 = x]\right)} $$ $$ = \sum_{x=1}^{13} {\left(\frac{4(x-1)}{51}*\frac{4}{52}\right)} $$ $$ = \frac{4}{51*13}\sum_{x=1}^{13} {(x-1)} $$ $$ = \frac{4*78}{51*13} $$ $$ = \frac{24}{51} $$
Similarly,
$$ P[X_2 > X_1] = \sum_{x=1}^{13} {\left(P[X_2 > X_1 | X_1 = x]*P[X_1 = x]\right)} $$ $$ = \sum_{x=1}^{13} {\left(P[X_2 > x]*P[X_1 = x]\right)} $$ $$ = \sum_{x=1}^{13} {\left(\frac{4(13-x)}{51}*\frac{4}{52}\right)} $$ $$ = \frac{24}{51} . $$
So, before you know whether the first card is high or low, there's an equal probability that you'll end up with a higher second card as there is with a lower second card - this stems from the fact that the first card itself could be high or low. Once you've seen that first drawn card, the probabilities change because you have more information.