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): awards inner_points points.
  • Middle annulus (1 < R <= 2): awards outer_points points.
  • Exterior (R > 2): awards 0 points.

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) returns P(R <= radius) as an exact Fraction for any non-negative integer radius.
  • ring_probabilities(p_within_1) returns the three-tuple (P(R <= 1), P(1 < R <= 2), P(R > 2)) of exact Fraction values.
  • expected_score(p_within_1, inner_points, outer_points) returns the expected point value of one shot as an exact Fraction.
  • Raise ValueError whenever p_within_1 is outside the open interval (0, 1), or whenever radius is negative or not a plain int (specifically rejecting bool and float).

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_1 must satisfy 0 < Fraction(p_within_1) < 1; values <= 0 or >= 1 must raise ValueError.
  • radius must be an int (and not a bool) satisfying radius >= 0; negative integers, booleans, and non-integers must raise ValueError.
  • inner_points and outer_points are integers (positive, zero, or negative).
  • Return exact fractions.Fraction instances reduced to lowest terms.

Step-by-step walkthrough

  1. Understand the target geometry and the three functions

    Each shot impacts at (X, Y) where X and Y are 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 spread sigma^2). Its radial distance from (0, 0) is R = 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 sigma directly — only the rational calibration probability P(R <= 1) = p_within_1 (such as 2/3 in Example 1). From that single fact, we want:

    1. The cumulative distribution function (CDF) P(R <= r) (the probability that R lands at or inside radius r) expressed cleanly so we know how radius affects hit probability.
    2. Exact rational disc and annulus probabilities (hit_probability and ring_probabilities) with zero floating-point approximation of sigma.
    3. The expected value (probability-weighted average payoff) expected_score as an irreducible Fraction.
  2. 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 >= 0 collapses to a simple exponential! Why? Multiplying two independent Gaussian densities puts x^2 + y^2 = rho^2 in the exponent, and switching to polar coordinates (rho, theta) (measuring distance rho from the origin and angle theta around the circle) supplies an extra factor of rho from the ring circumference 2 * 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)^2 is 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 mean 2. Scaling by sigma^2 means R^2 is exponential with mean 2 * sigma^2, so P(R <= r) = P(R^2 <= r^2) = 1 - exp(-r^2 / (2 * sigma^2)) (and R itself follows a Rayleigh distribution, the Euclidean norm of a circular 2D Gaussian vector).

  3. 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, define q as the probability of missing the unit disc:

    q = P(R > 1) = exp(-1 / (2 * sigma^2)) = 1 - p_within_1
    

    In Example 1, p_within_1 = 2/3, so q = 1 - 2/3 = 1/3. For every non-negative integer radius r, P(R > r) = q^(r^2) is an exact integer power of q because the exponent scales with r^2 (the area ratio between a radius-r disc 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/19683
    

    That gives P(R <= 2) = 80/81 directly — no logarithms, no square roots, and zero rounding error!

  4. Partition into disjoint zones and compute expected payoff

    Notice that P(R <= 2) = 80/81 measures the entire radius-2 disc, which already contains the center disc (R <= 1). Subtracting P(R <= 1) isolates the middle annulus 1 < 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 = 1
    

    Multiplying each zone's probability by its point reward (inner_points = 9, outer_points = 3, exterior = 0 in 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^3 and 188 is not divisible by 3 (1 + 8 + 8 = 17), 188/27 is already irreducible.

  5. Implement exact rational CDF with Fraction

    Python's standard fractions.Fraction tracks exact integer numerators and denominators and reduces every result automatically. Two validation guards enforce the mathematical domain:

    • p_within_1 must satisfy 0 < p < 1: p = 0 would correspond to infinite spread and p = 1 to zero spread (moreover, q = 0 at radius = 0 would compute 1 - 0 ** 0 = 0, contradicting zero spread).
    • radius must be a non-negative int (explicitly rejecting bool, since isinstance(True, int) is True in Python!): for fractional radii such as 1.5, q^2.25 is generally irrational and has no exact Fraction form.
    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_radius
    
  6. Implement zone probabilities and expected score

    With hit_probability ready, ring_probabilities slices the nested discs at radii 1 and 2, and expected_score computes 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_contribution
    

    Always 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 of 2/3.

  7. 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/3 gives sigma = 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)
    
  8. 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_probabilities and expected_score — Time O(1), Space O(1) (for fixed zone radii 1 and 2, assuming bounded-bit rational input p_within_1): Evaluating q ** 1 and q ** 4 plus a fixed handful of Fraction operations 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 integer radius = r — Time and Space polynomial in r^2: Python computes q ** (r^2) via binary exponentiation in O(log r) multiplications, while the big-integer numerator and denominator grow to O(r^2) digits.

Edge cases

  • radius = 0: P(R <= 0) = 1 - q^0 = 1 - 1 = 0. A continuous 2D density with sigma > 0 puts zero mass on the single point (0, 0).
  • Invalid calibration p <= 0 or p >= 1: Raises ValueError. No finite positive sigma yields P(R <= 1) = 0 or 1, and rejecting p = 1 avoids evaluating 0 ** 0 = 1 at radius = 0.
  • Negative, fractional, or boolean radius: Negative integers, floats like 1.5 (where (1/3)^2.25 is irrational), and booleans (True subclasses int in Python) all raise ValueError.
  • 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) returns Fraction(6, 1).
  • Binary float pitfalls: Passing Fraction(2, 3) stays exact, whereas passing 2 / 3 converts IEEE-754 rounding error into a 53-bit denominator.

Common mistakes

  • Treating R <= 1 as two independent 1D intervals: P(R <= 1) is P(X^2 + Y^2 <= 1), not P(|X| <= 1) * P(|Y| <= 1) (the latter measures the [-1, 1] x [-1, 1] square, whose corners extend out to R = sqrt(2)).
  • Raising q to r instead of r^2: Computing 1 - q^2 = 8/9 instead of 1 - q^4 = 80/81 forgets that R^2 — not R — follows the exponential distribution.
  • Forgetting to subtract the center disc from P(R <= 2): Using 80/81 directly as the middle-annulus probability double-counts R <= 1, making the three zone probabilities exceed 1.
  • Swapping exponential mean and rate: A chi-squared(2) variable has mean 2 (rate 1/2), so R^2 = sigma^2 * Chi^2(2) has mean 2 * sigma^2 and rate 1 / (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^2 an unequal weighted combination of two independent chi-squared(1) variables rather than a simple exponential, so P(R > r) = q^(r^2) no longer holds. Moreover, a single calibration value P(R <= 1) underdetermines (sigma_x, sigma_y) without a second piece of information such as sigma_y / sigma_x. Once both spreads are specified, you can evaluate P(R <= r) via 1D numerical quadrature by slicing vertically across x in [-r, r] and integrating the normal density of X against P(|Y| <= sqrt(r^2 - x^2)) = 2 * Phi(sqrt(r^2 - x^2) / sigma_y) - 1, where Phi is 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^2 follows a non-central chi-squared distribution (the sum of squared independent unit-variance Gaussians with non-zero means) with 2 degrees of freedom and non-centrality (mu_x^2 + mu_y^2) / sigma^2, while R follows a Rice distribution (the radial norm of an off-center circular 2D Gaussian). Rewriting the score as outer_points * I(R <= 2) + (inner_points - outer_points) * I(R <= 1) expresses E[Score] as a non-negative combination of P(R <= 2) and P(R <= 1) whenever inner_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 when outer_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 rate lambda = -ln(q) = -ln(1/3) = ln(3). Observe the identity max(0, 12 - 3 * T) = 12 - 3 * min(T, 4), valid because 12 - 3 * T hits 0 at T = 4 (R = 2). Applying the tail-sum integral (E[W] = integral_{0}^{infinity} P(W > t) dt for any non-negative variable W) gives E[min(T, 4)] = integral_0^4 P(T > t) dt = integral_0^4 exp(-lambda * t) dt = (1 - exp(-4 * lambda)) / lambda. Since exp(-4 * lambda) = q^4 = (1/3)^4 = 1/81 and lambda = ln(3), the exact expected payoff is 12 - 3 * (80 / 81) / ln(3) = 12 - 80 / (27 * ln(3)) ≈ 9.3030.

Follow-up questions

Similar questions

More DRW interview questions

All 30 DRW questions →