Note AcademyNote Academy

Computer Science · Oct / Nov 2024 · Paper 2 HL · Question 5

Adapt for 2027Spreadsheet models are no longer taught, so only the array-based simulation algorithm in part (c) can be used, written in Python or Java.

IBCS

As printed in the paper

The question as text

5. The probability of two people having the same birthday is 1/365 or 0.003. The probability of two people (one pair) from a random sample of N people sharing a birthday is calculated as follows: y Number of pairs (NP): (N*(N-1))/2 y Probability of a pair with different birthdays (PP): 364/365 = 0.997 y Probability of different pairs (DP) for a specified number of pairs (NP): PP^NP y Probability of a pair sharing a birthday (SB): 1-DP Table 1 shows how the probability of two people sharing a birthday is calculated in a sample of 23 people. Table 1: Calculating probabilities of pairs sharing a birthday Formula Result Number of pairs (NP) (N*(N-1))/2 = (23*22) / 2 253 Different pairs (DP) PP^NP = 0.997^253 0.500 Pair sharing a birthday (SB) 1-DP 0.500 Figure 2 shows the probability of two people sharing the same birthday, where N is the number of people in the sample. Figure 2: Probability of two people sharing the same birthday 0 0.00 0.25 0.50 0.75 1.00 10 20 30 40 Number of people in sample Probability of a shared birthday (Option B continues on the following page) (Option B, question 5 continued) The graph in Figure 2 was created from the spreadsheet shown below with the values shown in the first two rows: N NP DP SB 2 1 0.997 0.003 3 3 0.995 0.005

Read automatically from the paper; the printed page above is exact.

Show the answer and mark scheme
  • 5(a)[4]

  • 5(b)[4]

  • 5(c)[8]

  • 5(d)[2]

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.