[Math] probability of playing music player on shuffle and listening to every song.

probabilityrandom variables

I have a few problems I am trying to work out but I am not totally confident in my answers:

The problem is such:
Suppose you have a playlist consisting of four songs. You play your playlist in shuffle mode. In this mode, after the current song is played, the next song is chosen randomly from the
other three tracks. This ensures you never hear the same song twice in a row.Let X be the number of songs you listen to until you've heard all the four different songs.

1.How many sequences of 4 songs are there where no song plays twice in a row? If we label
the songs {A, B, C, D}, then examples are ABCD and ABAB but not ABBA.

For this problem I just thought the answer was (4^4) = 256 Does this make sense?

2.
I have to find the value of P(X=4). to do this I used the formula n!/(n^n) because (n^n) is the possible sequences of n songs, and because the possible sequence of n songs including every song is n!.

So my answer was: P(X=4) = 24/254 = 3/32

I am trying to understand really how this problem works, and I would like some more insight as to if these answers make sense/ how I should be tackling a problem like this. How would I compute problems like these?

Any help is appreciated.

Best Answer

I think for your number 1. The first song can be 4 different songs, right? Now how about the second song. The second song can be exactly 3 other songs, because you can't choose the same song twice. Same with the 3rd and fourth songs. That gives you 4*3*3*3 different possible choices (which equals like 108 I think).

For number 2, you did the right thing, but just replace the number from number 1.