Audition Online is a music game where players compete to gain the most number of points in a given song. In each song, there are a certain number of bars - in each bar, a player has to execute a certain sequence of keystrokes and press spacebar on the 4th beat. A judgment is made based on how accurately the spacebar is pressed - from best to worst, "perfect", "great", "cool", "bad", and "miss". When a player does 2 or more "perfects" consecutively, he will get bonus points for doing so. Within a song, the largest number of consecutive "perfects" a player gets is called his "chain".
A song has number of bars. Assume that a given player has a constant probability of getting a "perfect", , on each bar. The chain for a particular song (largest number of consecutive "perfects") is denoted as .
What is the expected value of in terms of and ?
Add-on: What is the probability of getting a particular in terms of and ? (In essence, what is the probability distribution of ?)
A valid solution must minimally satisfy the following cases:
We know that given (i.e. a completely perfect player), .
We also know that given (i.e. a completely horrible player), .
A song with basically has only one bar, hence .
A song with has two bars and the expected value of can be trivially calculated to be .