Alexa was coming up to her final exams, which were set across 18 days. Each of the 18 days had 2 sessions, a morning and an afternoon session. Alexa had to complete 6 exams altogether.
When the exam timetable was released, Alexa was very disappointed that she had 2 days on which she had to complete 2 exams, one in the morning and one in the afternoon, on that same day.
Determine the probability that Alexa would find her 6 exams set on just 4 days.
There are 18 morning time slots and 18 afternoon time slots. Let's assume a mechanism is in place so that the probability of a conflict is zero. I'll also assume that "just 4 days" means "exactly 4 days".
There are 36*35*34*33*32*31 = 1402410240 ways the six exams could have been assigned their time slots.
There are C(6,4)*3 = 45 ways of choosing the exams to be paired, and once that is done, 18*17 ways of choosing the two days these occur, and then 4 ways the morning/afternoon status of these two days could be ordered, and 32*30 ways the remaining two exams could be arranged (not 32*31 as the other exam slot the same day is not happening).
That's 45 * 18*17 * 4 * 32*30 = 52876800.
52876800/1402410240 = 90/2387 = 0.0377042312526183
or about 3.8 %
Randomized stats:
clearvars,clc
hit=0;
for trial=1:2000000
sched=zeros(18,2);
s=randperm(36,6);
sched(s)=1;
ct=0;
for i=1:18
if sum(sched(i,:))==2
ct=ct+1;
end
end
if ct==2
hit=hit+1;
end
end
disp([hit trial hit/trial])
finds
75106 hits in 2000000 trials, for a prob of 0.037553, good to 2 or 3 significant figures, in agreement with the analysis..
|
Posted by Charlie
on 2023-12-15 13:46:03 |