From 334b28ed945577b12df6805d560d8f605500e82e Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 23 Jan 2025 19:53:30 -0800 Subject: [PATCH] Added "Somewhat Random Numbers" (#6) Reviewed-on: https://git.betalupi.com/Mark/handouts/pulls/6 Co-authored-by: Mark Co-committed-by: Mark --- src/Warm-Ups/Somewhat Random Numbers/main.typ | 81 +++++++++++++++++++ .../Somewhat Random Numbers/meta.toml | 6 ++ 2 files changed, 87 insertions(+) create mode 100644 src/Warm-Ups/Somewhat Random Numbers/main.typ create mode 100644 src/Warm-Ups/Somewhat Random Numbers/meta.toml diff --git a/src/Warm-Ups/Somewhat Random Numbers/main.typ b/src/Warm-Ups/Somewhat Random Numbers/main.typ new file mode 100644 index 0000000..a6c82f6 --- /dev/null +++ b/src/Warm-Ups/Somewhat Random Numbers/main.typ @@ -0,0 +1,81 @@ +#import "@local/handout:0.1.0": * + +#show: doc => handout( + doc, + quarter: link( + "https://betalupi.com/handouts", + "betalupi.com/handouts", + ), + + title: [Somewhat Random Numbers], + by: "Mark", +) + +#problem() +Alice generates 100 random numbers uniformly from $[0,1]$. \ +Bob generates 101 random numbers from $[0, 1]$, but deletes the lowest result. + +#v(2mm) + +Say we have both of the resulting arrays, but do not know who generated each one. \ +We would like to guess which of the two was generated by Bob. \ +What is the optimal strategy, and what is its probability of guessing correctly? + + +#solution([ + Looking at the mean seems like a good idea, but there's a better way: \ + Assign the array with the smaller _minimum_ to Alice. + + #v(3mm) + + To compute the probability, generate 201 numbers. \ + Assign the first 100 to Alice and the rest to Bob. \ + Look at the lowest two numbers (of these 201, *before* Bob drops his lowest). + + #v(8mm) + + We'll use the following notation: \ + `AB` means the lowest was owned by Alice, and the second-lowest, by Bob. + + #v(2mm) + + Probabilities are as follows: \ + - `AA`: $100\/201 times 99\/200 approx 0.246$ + - `AB`: $100\/201 times 101\/200 approx 0.251$ + - `BA`: $101\/201 times 100\/200 approx 0.251$ // spell:disable-line + - `BB`: $101\/201 times 100\/200 approx 0.251$ + + #v(4mm) + Now, Bob drops his lowest number. \ + We'll cross out the number he drops and box the new lowest number (i.e, the one we observe): + - #{ + ( + box(`A`, stroke: ored, inset: 1pt) + + box(`A`, inset: 1pt) + + box([: $approx 0.246$], inset: (top: 1pt, bottom: 1pt)) + ) + } + - #{ + ( + box(`A`, stroke: ored, inset: 1pt) + + box(strike(`B`), inset: 1pt) + + box([: $approx 0.251$], inset: (top: 1pt, bottom: 1pt)) + ) + } + - #{ + ( + box(strike(`B`), inset: 1pt) + + box(`A`, stroke: ored, inset: 1pt) + + box([: $approx 0.251$], inset: (top: 1pt, bottom: 1pt)) + ) + } + - #{ + ( + box(strike(`B`), inset: 1pt) + + box(`B`, stroke: ored, inset: 1pt) + + box([: $approx 0.251$], inset: (top: 1pt, bottom: 1pt)) + ) + } + #v(8mm) + Alice has the smallest number in 3 of 4 cases, which have a total probability of $approx 0.749$. +]) diff --git a/src/Warm-Ups/Somewhat Random Numbers/meta.toml b/src/Warm-Ups/Somewhat Random Numbers/meta.toml new file mode 100644 index 0000000..974af61 --- /dev/null +++ b/src/Warm-Ups/Somewhat Random Numbers/meta.toml @@ -0,0 +1,6 @@ +[metadata] +title = "Somewhat Random Numbers" + +[publish] +handout = true +solutions = true