FastPrepBetting on a Low Dice Total
Problems/Betting on a Low Dice Total

Betting on a Low Dice Total

Susquehanna International Group (SIG) logoSusquehanna International Group (SIG)● MediumINTERNNEW GRADFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Four reports from SIG technical phone rounds for quant research roles ask about the total of a handful of dice, and three of them frame it as a bet. In a report from April 2019 (internship), ten dice are rolled, a total of 30 or less wins $10, anything higher loses $1, and the candidate must decide whether to accept. A report from October 2020 (internship) has the same bet with twelve dice and a winning total under 30. A report from June 2023 (new grad) asks only how likely twelve dice are to total under 30. Its author tried a normal approximation but got the variance of one die wrong. A report from December 2018 (experienced hire) also uses twelve dice and a cutoff of 30, but its author could not recall the payoffs.

None of the reports gives limits or a required precision. Here, the number of dice (1 to 100), the cutoff t and both payoffs are inputs. The answer is the exact expected profit of one game, so a positive answer means the bet is worth taking. A total under 30 is the cutoff t = 29, and a = 1 with b = 0 gives the plain chance. Both interview bets are examples. Answers within 10^-9 (absolute or relative) are accepted.

Our version is about 85% the same as the reported questions.

You are offered a bet. You roll n fair six-sided dice and add up the numbers they show. If the total is at most t, you are paid a dollars. Otherwise, you pay b dollars.

Return the expected profit of one game, in dollars. A positive answer means the bet makes money on average, so you should play. A negative answer means you should not.

Your answer is accepted if its absolute error or its relative error is at most 10^-9.

Function

diceBetExpectedValue(n: int, t: int, a: int, b: int) → double

Examples

Example 1

n = 10t = 30a = 10b = 1return = 1.2546505173404714

This is an interview bet: ten dice, paid $10 for a total of 30 or less, pay $1 otherwise.

There are 6^10 = 60,466,176 equally likely rolls, and 12,393,645 of them total 30 or less. So the chance of winning is p = 12,393,645 / 60,466,176, about 0.20497.

The expected profit is 10 × p - 1 × (1 - p) = 11p - 1, about 1.2547. It is positive, so you should play.

Example 2

n = 12t = 29a = 10b = 1return = -0.8176788416386709

This is the twelve-dice version: a total under 30 means a total of at most 29.

Of the 6^12 = 2,176,782,336 rolls, 36,079,407 total 29 or less, so p is about 0.016575. The expected profit is 11p - 1, about -0.81768. Twelve dice average 42, so a total under 30 is rare. Do not play.

Example 3

n = 2t = 4a = 3b = 1return = -0.3333333333333333

Two dice total 4 or less in 6 of the 36 rolls: (1,1), (1,2), (2,1), (1,3), (2,2) and (3,1). So p = 1/6.

The expected profit is 3 × 1/6 - 1 × 5/6 = -1/3, about -0.33333.

Constraints

  • 1 <= n <= 100
  • 0 <= t <= 600
  • 0 <= a <= 10^4
  • 0 <= b <= 10^4

More Susquehanna International Group (SIG) Phone Screen questions

  • Dice Sum That Is a Multiple of mPHONE SCREEN · Seen Nov 2026
  • Find Median from Data StreamPHONE SCREEN · Seen Nov 2026
  • Painting Arcs to Nearest Neighbors on a CirclePHONE SCREEN · Seen Sep 2026
  • Filter Movies by Inclusive Year RangePHONE SCREEN · Seen Jul 2026
  • Best Single Reroll for Five DicePHONE SCREEN · Seen Feb 2026
  • Catching the Bus to the MoviePHONE SCREEN · Seen Jan 2026
  • Two Dice Summing to a TargetPHONE SCREEN · Seen Jan 2026
  • Median of Uniform Draws in an IntervalPHONE SCREEN · Seen Oct 2025
  • One Number Is the Average of the Other TwoPHONE SCREEN · Seen Jun 2025
  • Which Coin Pattern Shows Up FirstPHONE SCREEN · Seen May 2025

Similar questions at other companies

  • Dice-Walk Winning ProbabilityGoogle · PHONE SCREEN · ONSITE INTERVIEWGoogle interview questions
  • 3D Grid Diagonal Walk ProbabilityApple · PHONE SCREENApple interview questions
  • Coin Game From The EndsTekion · PHONE SCREENTekion interview questions
  • Starting Value with the Longest Collatz ChainZipRecruiter · PHONE SCREENZipRecruiter interview questions
  • Count Array DerangementsInMobi · PHONE SCREENInMobi interview questions
  • Maximum-Product Subarray with an Empty ChoiceAkuna Capital · PHONE SCREENAkuna Capital interview questions
  • Probability of Consecutive HeadsSquarepoint Capital · PHONE SCREENSquarepoint Capital interview questions
  • Count Staircase WaysGoldman Sachs · PHONE SCREENGoldman Sachs interview questions
  • New 21 Game ProbabilityUiPath · PHONE SCREEN
  • Count Stepping Numbers In RangeAmazon · PHONE SCREEN

Interview reports that mention this question

  • SIG Quant Researcher Experienced Hire Interviews: 11 Experiences
  • SIG Quant Research Intern Interviews: 60 Experiences
  • SIG Quant Researcher New Grad Interviews: 49 Experiences

Susquehanna International Group (SIG) interview experiences

  • SIG Quant Researcher Intern Interviews: 1 Experience
  • SIG Quant Second-Round Tech Screen: 1 Experience
All Susquehanna International Group (SIG) interview questionsSee Susquehanna International Group (SIG) hiring insights
Saved
class Solution {
    public double diceBetExpectedValue(int n, int t, int a, int b) {
        // Write your code here.
    }
}
Checking account…