# How to statistically choose cards to win at this game of “Ride The Bus”

So me and my friends will tend to play this game called "Ride the bus" and essentially the way it works is that we take a deck of cards and 'Riffle shuffle' the deck a minimum of 7 times, to get the deck properly shuffled. Then we lay 5 cards face down, I will use O to represent a card faced down and use the value and the suit for a face up card (i.e KH would be King of Hearts, 7D would be 7 of diamonds, etc.). So when we have the cards face down as so
$$O-O-O-O-O$$ Now the order that you pick the cards goes from left to right, and at each card you have to pick a different type that the card might be. What I mean by this is that the first card you pick you have to choose if the card is Red (R) or Black (B). If you choose the correct card you then move on to the next card, if you choose wrong you start at the beginning. when you move to the next card you then have to choose if the next card will be higher or lower than the first card. Again if you choose correctly it will move to the next and if not you start over again ( this continues for the entire game). Then for the third card you have to choose if its in-between the two previous cards (in terms of value) or outside the two previous. The fourth card you have to pick a suit, and the fifth you have to pick a colour again. Just an example of this I will show you how it works:
Cards are dealt: $$O-O-O-O-O$$
then I choose a black, dealer flips card to reveal: $$7C-O-O-O-O$$ Then I choose the next card will be higher than a 7, dealer flips card to reveal: $$7C-KH-O-O-O$$ Then I choose the next card will be in-between a 7 and a King, dealer flips card to reveal: $$7C-KH-8D-O-O$$ Then I choose the suit to be a Spade, dealer reveals card: $$7C-KH-8D-2S-O$$ then the last card I say it will be red, card is revealed as: $$7C-KH-8D-2S-QD$$ Now if at any point I chose wrong I would have to go back to the beginning (with leaving already flipped up cards alone) and start over. What I am wondering is there any statistical method you can use to get 'Off the Bus' in the least amount of picks... Obviously I just showed a perfect selection and it 5 steps, but is there any way to pick these cards so you as close to the 5 steps on average ?

It takes you at least one try for each card and at most two, so your score will be between $5$ and $10$ inclusive. The first card is an even guess, so will take $1.5$ tries on average. The chances on the other cards are influenced by what you see. If the first card is very low you have good odds with above. If the first two are close, you get good odds for the third with outside. For the last two the odds won't shift much based on what you see. I didn't compute it but the second and third take about $1\frac13$ each, the fourth $1\frac 34$and the last $1.5$ for an expected total around $7 \frac 5{12}$

Card counting should offer you a small advantage, but not much. To use your example:

First card is a guess. Probability $1/2$.
Second card, you should choose higher because there are $28$ of $51$ cards higher than a 7, and only $20$ lower (the others are the remaining 7s, where you lose anyway, I assume). I'm assuming Aces are high.
Thirdly, there are $20$ of $50$ cards between 7 and King, and $20$ lower than a 7, so either choice is optimal. (Also $4$ above king and $6$ which are 7s or Kings).
Then, there are $13$ spades but only $12$ of the other suits, due to the ones you've already selected.
Finally, there are $48$ cards left and half are black (the other half red), so it's another guess.

Overall, your chance of doing it in one try would be $\frac{1}{2} \times \frac{28}{51}\times \frac{2}{5}\times \frac{13}{49}\times \frac{1}{2} = \frac{26}{1785} \approx 1.46 \%$, given that particular selection and the optimal choices. I've assumed that if you say "higher than a 7" and it's a 7, you lose, rather than (say) swapping the card for another one.

With riffle shuffles, the cards won't technically be random, but $\ge 7$ should be good enough for them to be pseudorandom.