I kinda' suck at probability questions, ND....but I'll take the plunge, here. (I'm sure someone on here will correct me, if I'm wrong!!!........LOL!!)
Let's take a simple example and then apply it to your situation. Instead of 24 people, let's just suppose that we only have four. And let's let each person be represented by a different letter (person 1 =A , person 2 =B, etc.)......Now, we can think of these people as occupying "slots."
Note that there are four letters, A B C D, and there are 24 possible arrangements of these. To see this, note that there are 4 letters possible for slot 1 and three letters possible for slot 2 and two letters possible for slot 3 and one choice for slot 4. So.....4 x 3 x 2 x 1 = 24.
And let's let you and your friend be "A" and "B"......Note, that there are 2 possible arrangements for both of you.....either AB or BA. And both of you could occupy three different positions...(positions 1,2 .....positions 2,3....or positions 3,4). And note that, the other two people "C" and "D," can be arranged in 2 possible ways for each arrangement.
So, for instance....let's see what it looks like when you and your friend occupy positions 1,2. We have.....
ABCD or BACD or ABDC or BADC......so, you and your friend are arranged in two possible ways and the other two people are arranged in two possible ways. And since you and your friend could occupy any of three positions, the total arrangements possible where you and your friend are next to each other is given by....
(2 ways for AB) x (2 ways for CD) x (3 possible positions occupied by you and your friend) = 12.
So the probability that you and your friend are next to each other when four people are involved =
(12 arrangements) / (the total arrangements) = 1/2
---------------------------------------------------------------------------------------------------------------------------
So applying the same reasoning to 24 people...we have 2 arrangements possible for you and your friend in each position x 23 possible positions that you both could occupy x 22! arrangements for the other people in each arrangement. And the total arrangements possible are 24!
So we have [(2) x 23 x 22!] / 24! = 1/12
Same as Melody, I believe......however, don't bet your bank account on this!!....we've been known to "b**w a fuse" before .....!!!