Expected Target Score for Isotropic Gaussian Throws
Hard · Statistics & Math · Quantitative Researcher · Onsite
Problem Statement
An automated launcher aims at the center (0, 0) of a flat target plane. On each shot, the horizontal coordinate X and vertical coordinate Y are drawn independently from identical zero-mean Gaussian distributions with unknown variance sigma^2 > 0. Let R = sqrt(X^2 + Y^2) represent the Euclidean distance from the impact point (X, Y) to (0, 0).
Rather than knowing sigma directly, you are given a rational calibration constant p_within_1 (0 < p_within_1 < 1) equal to the exact probability P(R <= 1) that a shot lands inside or on the unit circle.
Concentric circular boundaries divide the plane into three disjoint scoring zones:
- Center disc (
R <= 1): awardsinner_pointspoints. - Middle annulus (
1 < R <= 2): awardsouter_pointspoints. - Exterior (
R > 2): awards0points.
Implement three functions using Python's fractions.Fraction so every output is an exact simplified rational number without floating-point approximation of sigma:
from typing import Tuple
from fractions import Fraction
def hit_probability(p_within_1: Fraction, radius: int) -> Fraction: ...
def ring_probabilities(p_within_1: Fraction) -> Tuple[Fraction, Fraction, Fraction]: ...
def expected_score(p_within_1: Fraction, inner_points: int, outer_points: int) -> Fraction: ...
hit_probability(p_within_1, radius)returnsP(R <= radius)as an exactFractionfor any non-negative integerradius.ring_probabilities(p_within_1)returns the three-tuple(P(R <= 1), P(1 < R <= 2), P(R > 2))of exactFractionvalues.expected_score(p_within_1, inner_points, outer_points)returns the expected point value of one shot as an exactFraction.- Raise
ValueErrorwheneverp_within_1is outside the open interval(0, 1), or wheneverradiusis negative or not a plainint(specifically rejectingboolandfloat).
Examples
Example 1
Input:
p_within_1 = Fraction(2, 3)
inner_points = 9
outer_points = 3
Output:
hit_probability(Fraction(2, 3), 2) -> Fraction(80, 81)
ring_probabilities(Fraction(2, 3)) -> (Fraction(2, 3), Fraction(26, 81), Fraction(1, 81))
expected_score(Fraction(2, 3), 9, 3) -> Fraction(188, 27)
Explanation: Missing the unit circle happens with probability q = 1 - 2/3 = 1/3. Because radial tail probabilities scale with squared radius, P(R > 2) = (1/3)^(2^2) = 1/81, giving P(R <= 2) = 80/81. Subtracting the center disc 2/3 = 54/81 leaves 26/81 in 1 < R <= 2. Weighting by zone rewards yields 9 * (2/3) + 3 * (26/81) = 6 + 26/27 = 188/27.
Example 2
Input:
p_within_1 = Fraction(4, 5)
inner_points = 12
outer_points = 4
Output:
hit_probability(Fraction(4, 5), 0) -> Fraction(0, 1)
ring_probabilities(Fraction(4, 5)) -> (Fraction(4, 5), Fraction(124, 625), Fraction(1, 625))
expected_score(Fraction(4, 5), 12, 4) -> Fraction(6496, 625)
Explanation: A continuous 2D Gaussian has zero probability of landing on the single point (0, 0), so P(R <= 0) = 0. With q = 1 - 4/5 = 1/5, the exterior tail beyond radius 2 is (1/5)^4 = 1/625, the middle annulus has mass 624/625 - 500/625 = 124/625, and the expected payoff is (12 * 500 + 4 * 124) / 625 = 6496/625.
Constraints
p_within_1must satisfy0 < Fraction(p_within_1) < 1; values<= 0or>= 1must raiseValueError.radiusmust be anint(and not abool) satisfyingradius >= 0; negative integers, booleans, and non-integers must raiseValueError.inner_pointsandouter_pointsare integers (positive, zero, or negative).- Return exact
fractions.Fractioninstances reduced to lowest terms.
Step-by-step walkthrough
Understand the target geometry and the three functions
Each shot impacts at
(X, Y)whereXandYare independent and identically distributed (i.i.d.) zero-mean Gaussian random variables (two separate bell-curve draws that do not influence each other and share the exact same spreadsigma^2). Its radial distance from(0, 0)isR = sqrt(X^2 + Y^2).Exterior: R > 2 (0 points) . - ~ ~ ~ - . . ' Middle annulus ' . / 1 < R <= 2 \ (outer_points, e.g. 3) | . - ~ ~ - . | | / Center disc \ | | | R <= 1 | | (inner_points, e.g. 9; calibrated to P(R <= 1) = p_within_1) | \ (0,0) / | \ ' - _ _ - ' / ' . . ' ' - _ _ _ - 'We are never given
sigmadirectly — only the rational calibration probabilityP(R <= 1) = p_within_1(such as2/3in Example 1). From that single fact, we want:- The cumulative distribution function (CDF)
P(R <= r)(the probability thatRlands at or inside radiusr) expressed cleanly so we know how radius affects hit probability. - Exact rational disc and annulus probabilities (
hit_probabilityandring_probabilities) with zero floating-point approximation ofsigma. - The expected value (probability-weighted average payoff)
expected_scoreas an irreducibleFraction.
- The cumulative distribution function (CDF)
Derive P(R <= r) from the 2D Gaussian density
Integrating a 1D bell curve over an interval has no elementary formula, yet integrating a circular 2D bell curve over a disc of radius
r >= 0collapses to a simple exponential! Why? Multiplying two independent Gaussian densities putsx^2 + y^2 = rho^2in the exponent, and switching to polar coordinates(rho, theta)(measuring distancerhofrom the origin and anglethetaaround the circle) supplies an extra factor ofrhofrom the ring circumference2 * pi * rho:f(x, y) = (1 / sqrt(2 * pi * sigma^2)) * exp(-x^2 / (2 * sigma^2)) * (1 / sqrt(2 * pi * sigma^2)) * exp(-y^2 / (2 * sigma^2)) = (1 / (2 * pi * sigma^2)) * exp(-(x^2 + y^2) / (2 * sigma^2)) Switch to polar coordinates: x^2 + y^2 = rho^2, area element dx dy = rho d_rho d_theta. Integrating theta over [0, 2*pi] contributes 2*pi, canceling the 2*pi in the denominator: P(R <= r) = integral_{rho = 0}^{r} (rho / sigma^2) * exp(-rho^2 / (2 * sigma^2)) d_rho Substitute u = rho^2 / (2 * sigma^2), so du = (rho / sigma^2) d_rho: P(R <= r) = integral_{u = 0}^{r^2 / (2 * sigma^2)} exp(-u) du = [-exp(-u)]_{0}^{r^2 / (2 * sigma^2)} = 1 - exp(-r^2 / (2 * sigma^2)) (for r >= 0, and 0 for r < 0)Standard distribution theory gives the exact same formula without calculus:
(X / sigma)^2 + (Y / sigma)^2is the sum of two squared independent standard normals, which defines a chi-squared distribution with 2 degrees of freedom — identical to an exponential distribution (P(T > t) = exp(-t / mean)) with mean2. Scaling bysigma^2meansR^2is exponential with mean2 * sigma^2, soP(R <= r) = P(R^2 <= r^2) = 1 - exp(-r^2 / (2 * sigma^2))(andRitself follows a Rayleigh distribution, the Euclidean norm of a circular 2D Gaussian vector).Cancel sigma algebraically via the unit-disc miss probability
Look at the exterior tail probability beyond radius
r >= 0:P(R > r) = 1 - P(R <= r) = exp(-r^2 / (2 * sigma^2)) = (exp(-1 / (2 * sigma^2)))^(r^2)Instead of taking logarithms to isolate
sigma, defineqas the probability of missing the unit disc:q = P(R > 1) = exp(-1 / (2 * sigma^2)) = 1 - p_within_1In Example 1,
p_within_1 = 2/3, soq = 1 - 2/3 = 1/3. For every non-negative integer radiusr,P(R > r) = q^(r^2)is an exact integer power ofqbecause the exponent scales withr^2(the area ratio between a radius-rdisc and the unit disc):Radius r | Exponent r^2 | Tail P(R > r) = q^(r^2) | Hit prob P(R <= r) = 1 - q^(r^2) ---------+--------------+-------------------------+--------------------------------- r = 0 | 0 | (1/3)^0 = 1 | 1 - 1 = 0 r = 1 | 1 | (1/3)^1 = 1/3 | 1 - 1/3 = 2/3 r = 2 | 4 | (1/3)^4 = 1/81 | 1 - 1/81 = 80/81 r = 3 | 9 | (1/3)^9 = 1/19683 | 1 - 1/19683 = 19682/19683That gives
P(R <= 2) = 80/81directly — no logarithms, no square roots, and zero rounding error!Partition into disjoint zones and compute expected payoff
Notice that
P(R <= 2) = 80/81measures the entire radius-2disc, which already contains the center disc (R <= 1). SubtractingP(R <= 1)isolates the middle annulus1 < R <= 2:[-------- P(R <= 2) = 80/81 --------][ P(R > 2) = 1/81 ] [ P(R <= 1) = 54/81 ][ 1 < R <= 2 ] = 80/81 - 54/81 = 26/81 Check total mass: 54/81 + 26/81 + 1/81 = 81/81 = 1Multiplying each zone's probability by its point reward (
inner_points = 9,outer_points = 3, exterior =0in Example 1) produces the expected score:E[Score] = 9 * P(R <= 1) + 3 * P(1 < R <= 2) + 0 * P(R > 2) = 9 * (2 / 3) + 3 * (26 / 81) = 6 + 26 / 27 = 188 / 27 (≈ 6.9630)Because
27 = 3^3and188is not divisible by3(1 + 8 + 8 = 17),188/27is already irreducible.Implement exact rational CDF with Fraction
Python's standard
fractions.Fractiontracks exact integer numerators and denominators and reduces every result automatically. Two validation guards enforce the mathematical domain:p_within_1must satisfy0 < p < 1:p = 0would correspond to infinite spread andp = 1to zero spread (moreover,q = 0atradius = 0would compute1 - 0 ** 0 = 0, contradicting zero spread).radiusmust be a non-negativeint(explicitly rejectingbool, sinceisinstance(True, int)isTruein Python!): for fractional radii such as1.5,q^2.25is generally irrational and has no exactFractionform.
from fractions import Fraction def hit_probability(p_within_1: Fraction, radius: int) -> Fraction: # Convert to an exact rational fraction (e.g. Fraction(2, 3)). p = Fraction(p_within_1) # A true Gaussian with 0 < sigma < inf has 0 < P(R <= 1) < 1 strictly: # p == 0 would require infinite spread, and p == 1 would require zero spread. if not (0 < p < 1): raise ValueError("p_within_1 must be strictly between 0 and 1") # Reject booleans (since bool subclasses int in Python), non-integers, and negatives. if isinstance(radius, bool) or not isinstance(radius, int) or radius < 0: raise ValueError("radius must be a non-negative integer") # For X, Y ~ N(0, sigma^2) i.i.d., R^2 = X^2 + Y^2 follows Exponential(mean = 2 * sigma^2), # so P(R > r) = exp(-r^2 / (2 * sigma^2)) = (exp(-1 / (2 * sigma^2))) ** (r^2). # Let miss_unit_circle = P(R > 1) = 1 - p (e.g. 1/3 when p = 2/3). # Raising it to r^2 cancels sigma completely (e.g. r = 2 -> 1 - (1/3)**4 = 80/81). miss_unit_circle = 1 - p area_exponent = radius * radius miss_at_radius = miss_unit_circle ** area_exponent return 1 - miss_at_radiusImplement zone probabilities and expected score
With
hit_probabilityready,ring_probabilitiesslices the nested discs at radii1and2, andexpected_scorecomputes the weighted sum for any(inner_points, outer_points)pair:from typing import Tuple from fractions import Fraction def ring_probabilities(p_within_1: Fraction) -> Tuple[Fraction, Fraction, Fraction]: # Phase 1: Compute cumulative disc probabilities for radius 1 and radius 2. p_inside_1 = hit_probability(p_within_1, 1) p_inside_2 = hit_probability(p_within_1, 2) # Phase 2: Slice the nested discs into three mutually exclusive regions that sum to 1: # e.g. for p = 2/3 -> (2/3, 80/81 - 2/3 = 26/81, 1 - 80/81 = 1/81). p_inner_ring = p_inside_1 p_outer_ring = p_inside_2 - p_inside_1 p_miss = 1 - p_inside_2 return p_inner_ring, p_outer_ring, p_miss def expected_score(p_within_1: Fraction, inner_points: int, outer_points: int) -> Fraction: p_inner_ring, p_outer_ring, _p_miss = ring_probabilities(p_within_1) # Phase 3: Sum point * probability across disjoint regions (exterior awards 0 points): # e.g. for p = 2/3, inner = 9, outer = 3 -> 9 * 2/3 + 3 * 26/81 = 188/27. inner_contribution = inner_points * p_inner_ring outer_contribution = outer_points * p_outer_ring return inner_contribution + outer_contributionAlways construct rational inputs via
Fraction(2, 3)(or"2/3") rather than binary floats:Fraction(2 / 3)captures IEEE-754 rounding artifacts (6004799503160661/9007199254740992) instead of2/3.Verify with a Monte Carlo shot simulation
In quantitative interviews, checking closed-form algebra against a quick Monte Carlo simulation (estimating probabilities and expectations by averaging many random draws) catches exponent slips immediately. For Example 1 (
q = 1/3),exp(-1 / (2 * sigma^2)) = 1/3givessigma = sqrt(1 / (2 * ln 3)) ≈ 0.67464:import math import numpy as np rng = np.random.default_rng(11) sigma = math.sqrt(1.0 / (2.0 * math.log(3.0))) # Simulate 400,000 independent (X, Y) impacts and compute squared radii R^2 = X^2 + Y^2. xy = rng.normal(0.0, sigma, size=(2, 400_000)) r_squared = (xy ** 2).sum(axis=0) inner_rate = float(np.mean(r_squared <= 1.0)) # ~0.6667 (exact: 2/3) outer_rate = float(np.mean((r_squared > 1.0) & (r_squared <= 4.0))) # ~0.3210 (exact: 26/81) mean_score = 9.0 * inner_rate + 3.0 * outer_rate # ~6.9630 (exact: 188/27)Complete solution
from typing import Tuple from fractions import Fraction def hit_probability(p_within_1: Fraction, radius: int) -> Fraction: """Exact P(R <= radius) for X, Y ~ N(0, sigma^2) i.i.d. and R = sqrt(X^2 + Y^2). sigma is fixed by the calibration P(R <= 1) = p_within_1, with 0 < p_within_1 < 1. `radius` is a non-negative integer, so that the answer stays a rational number. Raise ValueError for a p_within_1 outside (0, 1) or a negative radius. """ # Convert to an exact rational fraction (e.g. Fraction(2, 3)). p = Fraction(p_within_1) # A true Gaussian with 0 < sigma < inf has 0 < P(R <= 1) < 1 strictly: # p == 0 would require infinite spread, and p == 1 would require zero spread. if not (0 < p < 1): raise ValueError("p_within_1 must be strictly between 0 and 1") # Reject booleans (since bool subclasses int in Python), non-integers, and negatives. if isinstance(radius, bool) or not isinstance(radius, int) or radius < 0: raise ValueError("radius must be a non-negative integer") # For X, Y ~ N(0, sigma^2) i.i.d., R^2 = X^2 + Y^2 follows Exponential(mean = 2 * sigma^2), # so P(R > r) = exp(-r^2 / (2 * sigma^2)) = (exp(-1 / (2 * sigma^2))) ** (r^2). # Let miss_unit_circle = P(R > 1) = 1 - p (e.g. 1/3 when p = 2/3). # Raising it to r^2 cancels sigma completely (e.g. r = 2 -> 1 - (1/3)**4 = 80/81). miss_unit_circle = 1 - p area_exponent = radius * radius miss_at_radius = miss_unit_circle ** area_exponent return 1 - miss_at_radius def ring_probabilities(p_within_1: Fraction) -> Tuple[Fraction, Fraction, Fraction]: """(P(R <= 1), P(1 < R <= 2), P(R > 2)) as exact fractions.""" # Phase 1: Compute cumulative disc probabilities for radius 1 and radius 2. p_inside_1 = hit_probability(p_within_1, 1) p_inside_2 = hit_probability(p_within_1, 2) # Phase 2: Slice the nested discs into three mutually exclusive regions that sum to 1: # e.g. for p = 2/3 -> (2/3, 80/81 - 2/3 = 26/81, 1 - 80/81 = 1/81). p_inner_ring = p_inside_1 p_outer_ring = p_inside_2 - p_inside_1 p_miss = 1 - p_inside_2 return p_inner_ring, p_outer_ring, p_miss def expected_score(p_within_1: Fraction, inner_points: int, outer_points: int) -> Fraction: """Expected score of one throw: inner_points for R <= 1, outer_points for 1 < R <= 2, 0 for R > 2.""" p_inner_ring, p_outer_ring, _p_miss = ring_probabilities(p_within_1) # Phase 3: Sum point * probability across disjoint regions (exterior awards 0 points): # e.g. for p = 2/3, inner = 9, outer = 3 -> 9 * 2/3 + 3 * 26/81 = 188/27. inner_contribution = inner_points * p_inner_ring outer_contribution = outer_points * p_outer_ring return inner_contribution + outer_contribution✅ Submit now — all tests should pass.
Intuition & how it works
Imagine spraying paint droplets toward the center of a round bullseye: droplets cluster most densely around (0, 0) and thin out symmetrically in every direction. Because X and Y follow an isotropic bivariate normal distribution — two independent zero-mean bell curves with equal variance sigma^2 — the rescaled squared distance (X / sigma)^2 + (Y / sigma)^2 follows a chi-squared distribution with 2 degrees of freedom (the distribution formed by adding the squares of two independent standard normal variables), which turns out to be an exact exponential distribution (a memoryless decay curve P(T > t) = exp(-lambda * t)). Consequently, the cumulative distribution function (CDF) (the probability of landing inside or on radius r >= 0) is P(R <= r) = 1 - exp(-r^2 / (2 * sigma^2)), and the exterior tail probability is P(R > r) = exp(-r^2 / (2 * sigma^2)). Letting q = P(R > 1) = 1 - p_within_1 denote the probability of missing the unit disc rewrites P(R > r) as q^(r^2) — doubling the radius quadruples the disc's area (r^2 = 4), raising the miss probability to the fourth power!
Why does the naive approach stumble? Integrating X and Y in Cartesian (x, y) coordinates traps you inside the error function (erf) (the non-elementary integral of the 1D Gaussian curve) over curved sqrt(r^2 - x^2) limits. Even after converting to polar coordinates, solving 1 - exp(-1 / (2 * sigma^2)) = 2/3 numerically for sigma ≈ 0.67464... introduces binary floating-point rounding (6.962962962962964), preventing exact fraction recovery without guesswork.
Let's trace Example 1 (p_within_1 = 2/3, inner_points = 9, outer_points = 3, exterior = 0):
1. Unit-disc miss probability:
q = P(R > 1) = 1 - 2/3 = 1/3
2. Radius-2 disc probability (exponent is r^2 = 2^2 = 4, NOT 2):
P(R > 2) = q^4 = (1/3)^4 = 1/81
P(R <= 2) = 1 - 1/81 = 80/81
3. Disjoint scoring zones:
Center disc P(R <= 1) = 2/3 = 54/81 (worth 9 points)
Middle annulus P(1 < R <= 2) = 80/81 - 2/3 = 26/81 (worth 3 points)
Exterior P(R > 2) = 1/81 (worth 0 points)
4. Expected value (probability-weighted average score):
E[Score] = 9 * (2/3) + 3 * (26/81) + 0 * (1/81)
= 6 + 26/27
= 188/27 (irreducible since 27 = 3^3 and 188 is not divisible by 3; ≈ 6.9630)
Complexity
ring_probabilitiesandexpected_score— TimeO(1), SpaceO(1)(for fixed zone radii1and2, assuming bounded-bit rational inputp_within_1): Evaluatingq ** 1andq ** 4plus a fixed handful ofFractionoperations and greatest common divisor (GCD) reductions (dividing numerator and denominator by their largest shared factor) runs in constant time and memory.hit_probability(p_within_1, radius)for general integerradius = r— Time and Space polynomial inr^2: Python computesq ** (r^2)via binary exponentiation inO(log r)multiplications, while the big-integer numerator and denominator grow toO(r^2)digits.
Edge cases
radius = 0:P(R <= 0) = 1 - q^0 = 1 - 1 = 0. A continuous 2D density withsigma > 0puts zero mass on the single point(0, 0).- Invalid calibration
p <= 0orp >= 1: RaisesValueError. No finite positivesigmayieldsP(R <= 1) = 0or1, and rejectingp = 1avoids evaluating0 ** 0 = 1atradius = 0. - Negative, fractional, or boolean
radius: Negative integers, floats like1.5(where(1/3)^2.25is irrational), and booleans (Truesubclassesintin Python) all raiseValueError. - Zero or negative zone rewards (
inner_points = 0,outer_points < 0): Handled directly by linear expectation without special cases; e.g.,expected_score(Fraction(2, 3), 9, 0)returnsFraction(6, 1). - Binary float pitfalls: Passing
Fraction(2, 3)stays exact, whereas passing2 / 3converts IEEE-754 rounding error into a 53-bit denominator.
Common mistakes
- Treating
R <= 1as two independent 1D intervals:P(R <= 1)isP(X^2 + Y^2 <= 1), notP(|X| <= 1) * P(|Y| <= 1)(the latter measures the[-1, 1] x [-1, 1]square, whose corners extend out toR = sqrt(2)). - Raising
qtorinstead ofr^2: Computing1 - q^2 = 8/9instead of1 - q^4 = 80/81forgets thatR^2— notR— follows the exponential distribution. - Forgetting to subtract the center disc from
P(R <= 2): Using80/81directly as the middle-annulus probability double-countsR <= 1, making the three zone probabilities exceed1. - Swapping exponential mean and rate: A chi-squared(2) variable has mean
2(rate1/2), soR^2 = sigma^2 * Chi^2(2)has mean2 * sigma^2and rate1 / (2 * sigma^2).
Follow-up questions
- What if horizontal and vertical spreads differ (sigma_x != sigma_y)—how does that alter the distribution of R^2 and how would you evaluate disc hit probabilities? Equal-density contours deform from circles into axis-aligned ellipses, making
R^2 = sigma_x^2 * Z_1^2 + sigma_y^2 * Z_2^2an unequal weighted combination of two independent chi-squared(1) variables rather than a simple exponential, soP(R > r) = q^(r^2)no longer holds. Moreover, a single calibration valueP(R <= 1)underdetermines(sigma_x, sigma_y)without a second piece of information such assigma_y / sigma_x. Once both spreads are specified, you can evaluateP(R <= r)via 1D numerical quadrature by slicing vertically acrossx in [-r, r]and integrating the normal density ofXagainstP(|Y| <= sqrt(r^2 - x^2)) = 2 * Phi(sqrt(r^2 - x^2) / sigma_y) - 1, wherePhiis the standard normal CDF. - Suppose the aim center shifts to a non-zero offset (mu_x, mu_y) != (0, 0). Which standard distribution governs R^2 / sigma^2, and can deliberate off-center aiming ever raise the expected payoff when inner_points >= outer_points >= 0? Rescaled by
sigma^2,R^2 / sigma^2follows a non-central chi-squared distribution (the sum of squared independent unit-variance Gaussians with non-zero means) with2degrees of freedom and non-centrality(mu_x^2 + mu_y^2) / sigma^2, whileRfollows a Rice distribution (the radial norm of an off-center circular 2D Gaussian). Rewriting the score asouter_points * I(R <= 2) + (inner_points - outer_points) * I(R <= 1)expressesE[Score]as a non-negative combination ofP(R <= 2)andP(R <= 1)wheneverinner_points >= outer_points >= 0. Because shifting a symmetric bell curve away from(0, 0)strictly decreases probability mass inside every origin-centered disc, any non-zero aim offset strictly lowers expected payoff unless both zone rewards are zero (off-center aiming can only help whenouter_points > inner_points). - If discrete rings are replaced by a smooth radial payoff g(R) = max(0, 12 - 3 * R^2) under calibration P(R <= 1) = 2/3, what is the exact expected payoff? Write
T = R^2, which follows an exponential distribution with ratelambda = -ln(q) = -ln(1/3) = ln(3). Observe the identitymax(0, 12 - 3 * T) = 12 - 3 * min(T, 4), valid because12 - 3 * Thits0atT = 4(R = 2). Applying the tail-sum integral (E[W] = integral_{0}^{infinity} P(W > t) dtfor any non-negative variableW) givesE[min(T, 4)] = integral_0^4 P(T > t) dt = integral_0^4 exp(-lambda * t) dt = (1 - exp(-4 * lambda)) / lambda. Sinceexp(-4 * lambda) = q^4 = (1/3)^4 = 1/81andlambda = ln(3), the exact expected payoff is12 - 3 * (80 / 81) / ln(3) = 12 - 80 / (27 * ln(3)) ≈ 9.3030.
Follow-up questions
- What if horizontal and vertical spreads differ (sigma_x != sigma_y)—how does that alter the distribution of R^2 and how would you evaluate disc hit probabilities?
- Suppose the aim center shifts to a non-zero offset (mu_x, mu_y) != (0, 0). Which standard distribution governs R^2 / sigma^2, and can deliberate off-center aiming ever raise the expected payoff when inner_points >= outer_points >= 0?
- If discrete rings are replaced by a smooth radial payoff g(R) = max(0, 12 - 3 * R^2) under calibration P(R <= 1) = 2/3, what is the exact expected payoff?
Similar questions
- Three-Dice Product Distribution and Quoting Risk
- Expected Covering Arc Length
- Markov Steady-State Solver and Zero-Sum Equilibria
- Spectrum and Eigenvalue Sum of an Inverse Matrix
- Rolling Population and Sample Standard Deviation
- Stopping Time and Absorption Odds for Two Cart Queues
More DRW interview questions
- Maximum Even-Frequency Subsequence of Ones and Twos Medium
- Annual Account Balance After Monthly Fee Waivers Easy
- Stopping Time and Absorption Odds for Two Cart Queues Hard Pro
- Conditional Flip Count When HHT Beats HTH Hard Pro
- Prize Collection Odds on a 45-Node Ring Hard Pro
- Minimum Postponed Debits for Non-Negative Ledger Easy Pro
- Scoped Nested Transactions for a Key-Value Store Easy Pro
- Longest Substring With Uniform Character Counts Easy Pro
- Largest Even-Parity Subsequence of Ones and Twos Hard Pro
- Smallest Array Spread Within Three Element Edits Easy Pro