wilows balloc

in search of the window seat

so, i've made a lot of trips between Portugal and Sweden, which is around 4 hours, and i ALWAYS fly with Ryanair. i'm a cheap bastard, i'm young, and all i care about is getting there asap for the lowest possible price.

but here's the problem with Ryanair: you don't get to choose your seat unless you pay extra — have i said i'm a cheap bastard? — and i don't intend to do that.

now comes the real issue: i like to sleep. but to sleep i need to have my head rested, and that's only possible if you get a window seat. so imagine me, waking up at 3am, running on 4 hours of sleep, and then not being able to sleep a single minute on the plane because i didn't land a window seat.

this made me wonder: is there a way to secure a higher probability of getting a window seat?

i was sure there was. imagine this: 1/3 of the seats on the flight are window seats. assume no one has the chance to choose, and seats are assigned randomly, one by one. my idea was that at the start, more non-window seats would be taken, which would somehow increase the probability of me getting a window seat.

well, sorry for the bad news, but it doesn’t work like that — at least according to my rusty statistics. let's see why.


setup

imagine this scenario: there are X rows, and each row has 6 seats, 2 of them by the window, like this:

vrum vrum plain go fly

let's assume the number of available seats is N=120, where 1200(mod6).

let t1 be the number of people already assigned seats, so if we're assigning a new seat, that's for person t.

what we're interested in is the unconditional probability — the expectation over all possible histories.

let’s call P(t) the probability that person t gets a window seat. then:

P(t)=𝔼[WremR]

where:

since R is deterministic (if we’re calculating for person t, then R=N(t1)), we can move it out of the expectation:

P(t)=𝔼[Wrem]R

derivation

now we need to find 𝔼[Wrem].

label each of the 40 window seats as 1,,40. define an indicator variable Xi:

then the remaining window seats are the sum of these indicators:

Wrem=i=140Xi

by the linearity of expectation:

𝔼[Wrem]=i=140𝔼[Xi]=i=140P(Xi=1)

where P(Xi=1) is the probability that a specific seat i is not taken after t1 people are seated.

how to calculate this?

so:

P(Xi=1)=(N1t1)(Nt1)=(N1)!(t1)!(Nt)!N!(t1)!(Nt+1)!=Nt+1N=RN

therefore, the expected number of remaining window seats is:

𝔼[Wrem]=40×RN

result

plugging this back into our original formula:

P(t)=𝔼[Wrem]R=40·RNR=40N

for N=120:

P(t)=40120=13

so, unfortunately, unless i’m wrong (which has a high chance of happening and i hope i am), i’m fucked.


i also ran a small simulation with 10 million trials, this was the result: vrum vrum plain go fly