Finish a number sequence, price a dice bet, size a wager, quote an interval for a quantity you cannot look up: that covers most of what Optiver's data scientist questions ask, and hardly any of them involve SQL or a trained model. Read this page if you prepared for a product analytics loop and now need timed mental math, probability under pressure and the habit of putting a price on things.
Sequences, dice, bets and quotes in place of SQL
The topic breakdown on this page files the questions under statistics, coding, machine learning and software fundamentals, and the labels mislead. The three questions tagged machine learning are a bus that runs late half the time, a market-making estimation game and a test that has you rank statements by how likely they are. Each is a probability or judgment problem. The coding-tagged questions are sequences with gaps, a matching task built on lookalike characters, apartments moved between four floors, and two apple piles that change by doubling. The single software-fundamentals question is a proof about a Latin square.
Four families run through the bank. The largest is probability and expectation: coin flips, dice, a random walk around an octagon, colored counters drawn from a bag until a color runs out, and the late bus. Next come number-logic sequences, where you name the rule and supply the next or missing term, alongside a speed task about matching codes. A third family is about money and calibration: expected value, variance, arbitrage and sizing across betting games, the estimation game scored on intervals, and the likelihood ranking. The fourth is a set of short puzzles that end in a proof or a minimum count.
Each question also carries a round. The sequences, the rapid and take-home probability sets, the likelihood ranking, the code matching and the floor puzzle are tagged as online assessment questions. The betting games, the estimation game, the octagon walk, the bus, the counters, the apple piles and the Latin square are tagged as technical screen questions. That split suggests two kinds of practice: fast, accurate answers to short items, and single problems you explain step by step out loud. The rapid-fire set has its teasers worked on a whiteboard despite the assessment tag, so practice those out loud too.
Candidates also weighing the engineering track can turn to the Optiver software engineer guide. Every data scientist question discussed here is listed on the Optiver data scientist questions page.
Number Logic, Beat the Odds and a Likelihood Test: one candidate's assessment
Two candidate accounts describe the online assessment. One lists three parts completed in a fixed order: Number Logic for 25 minutes, Beat the Odds for 45 minutes and a Likelihood Test for 25 minutes. The same candidate recalls sequences that mixed whole numbers with fractions and sequences built from two alternating patterns, and offers no guarantee that their remembered answers were right. The other account recalls a long run of short probability questions, seventeen in that candidate's count, covering integers with no repeated digit, a die rolled until a high face appears, the expected product of three card values and a pile of coins with heads paired off against tails. You can read both in full among the candidate accounts from Optiver data scientists.
Treat the durations as one person's recollection, since formats change, and read the instructions on the day before you budget time. If the order holds, sequences come first, so warm up on sequences that morning. The middle part, Beat the Odds, is the longest in that account. Its name suggests odds and expectation, so give that material the most timed practice.
The timed parts in one account and the seventeen short questions in the other both reward pacing. In the bank, the take-home probability set opens with three coin flips and a die thrown twice and builds from there, and the rapid-fire set frames each teaser as a few minutes of work that should end in an exact closed form. A habit that helps under a clock is to write the sample space or the list of states in one line before any arithmetic.
Dice, coins and exact fractions at speed
Short probability questions draw on a small toolbox, and speed comes from picking the right tool first. Have these five ready:
- Counting and complements. Count position by position, as one account's integers with no repeated digit invite, and turn "at least one" or "not all the same" into one minus the opposite event.
- Indicators. Write an expected count as a sum of yes-or-no indicators; they need not be independent. The expected number of distinct faces in six rolls is
6 * (1 - (5/6)^6), about 3.99. The colored-counters question below asks for an expected count too. - First-step conditioning. For a process that repeats until something happens, such as one account's die rolled until it shows more than four, write the expectation in terms of itself after one step and solve.
- Symmetry. Interchangeable colors, players or positions have equal answers, which can turn a long sum into one division; the counters bag, ten of each of three colors, is built this way.
- Tail sums. For a nonnegative integer variable, the mean is the sum over k from 1 upward of
P(X >= k), which makes dice maxima a one-line job; the worked market below rests on it.
Keep dice arithmetic in exact fractions over 6, 36 and 216 until the last line, and memorize (5/6)^2 = 25/36, (5/6)^3 = 125/216 (about 0.579) and (5/6)^6 (about 0.335). When a prompt asks for an exact answer, a decimal is a different answer; when it accepts a tight numeric value, give three significant figures and say how you rounded.
Before you report an expectation, say the range it must fall in: the expected maximum of several dice sits between 3.5 and 6, and an expected count cannot exceed the number of trials. A result outside the range means a setup error.
The octagon walk, the late bus and the last color standing
The probability questions tagged to the technical screen are single problems with more structure, and each one rewards drawing the process before computing anything.
The octagon question asks for the expected number of coin flips until a meeting on a random walk around the eight vertices of an octagon. For this family, compress the state: find the smallest quantity that determines how much longer the process runs, list its possible values, and write one first-step equation per value. Symmetry usually shortens the list. Once the equations are written, solving them is routine, so the thinking goes into the choice of state. Check the method on a square, where you can enumerate the cases by hand.
The bus question schedules buses every x minutes, makes each one either on time or half a period late with even odds, and has you arrive at a random moment. Waiting-time problems share one trap, the waiting-time paradox: a random arrival is more likely to land in a long gap than a short one, so half the average gap understates the wait. Draw two or three periods on a timeline, mark every time a bus can arrive, and work out the possible gap lengths and their frequencies before averaging. Check whether one bus can ever overtake another, because that changes the order of arrivals.
The counters question draws without replacement from a bag of thirty counters, ten of each of three colors, and stops once only two colors are left in the bag. Draws without replacement get easier when you picture the whole bag shuffled into a random line and restate the stopping rule as a statement about positions in that line. Indicators then do the counting. Leave the answer as a fraction and check it on a bag with one or two counters per color, where you can list every order.
The natural extension of each of these is a changed number: a different polygon, a bus late with another probability, a bag with unequal colors. A method built on a state equation or an indicator sum absorbs that change in a minute, while a shortcut found by luck usually has to be rediscovered.
Finishing a sequence before the timer does
The sequence questions give a short run of terms and ask for the rule and the next or missing term. One bank question strings eight sequences together, mixing integer runs with fraction runs, and another asks you to fill gaps inside sequences instead of extending them. The candidate who described the three-part assessment recalls the same mix.
Rules in this style come from a short list, so test them in order of how often they appear and how fast they are to check:
- First differences, then second differences.
- Ratios between neighbors, including ratios that alternate or grow.
- Two interleaved sequences: split the odd and even positions and read each alone.
- Alternating operations, such as add then multiply.
- Terms built from the previous two or three by sum, product or difference.
- Squares, cubes, primes and factorials one step away, such as
n^2 + 1or a prime minus one. - For fractions, numerators and denominators as separate sequences. If a whole number sits among fractions, rewrite it as a fraction with a matching denominator and look again.
A rule that fits every term but needs three operations is usually the wrong rule. Give each sequence a fixed budget of about three minutes, mark a skip, and come back. A missing-term version is easier to verify than a next-term one, because the term you insert has to make both sides of it follow the same rule.
The matching question sits next to the sequences because it tests the same speed and care. You compare a reference code of seven or eight characters against four candidates and pick the exact match fast, with lookalikes such as the letter O against zero, or a capital I against the digit one, as the trap. Read in chunks of three or four characters and compare from the right as well as the left, since a single changed character can sit anywhere. The prompt then grows into a short design question about candidates arriving as a stream. Fix the rules first: is matching case-sensitive, and do lookalikes count as equal or as errors? Then say how you check each arriving candidate in time proportional to its length, and what you would record when a near-miss arrives.
Pricing bets, spotting arbitrage and playing the interval game
The money questions share one habit: put a price on something before deciding what to do with it. The betting-games question works through expected value, variance, arbitrage and sizing across several games, and that order is a sound plan for each game.
Expected value comes first, stated per unit staked. Variance comes second, because two bets with the same edge can deserve very different sizes. Arbitrage is a separate check: if you can combine positions so the payout is the same in every outcome and costs less than that payout, the profit is riskless and only your limits cap the size. Convert quoted odds to implied probabilities; quotes whose implied probabilities sum to less than one, or that disagree across two sources, are where to look.
For sizing, the Kelly criterion is the reference point. On a bet paying b to one with win probability p, the growth-maximizing fraction of the bankroll is (b*p - (1 - p)) / b, which is 2p - 1 at even money. Say why you would bet a fraction of Kelly in practice: half Kelly keeps about three quarters of the growth rate, while twice Kelly drives it to roughly zero, so an edge you only estimate argues for betting less. If a game is played once and the goal is expected value alone, Kelly is the wrong frame, and saying so belongs in the answer.
The estimation game in the bank runs five rounds; in each you face a quantity you cannot know exactly and answer with an interval. Two skills meet here. The estimate comes from a Fermi decomposition: break the quantity into factors you can bound, multiply, and center on the geometric mean of your low and high ends, since errors in such estimates compound by multiplication. The width comes from the scoring rule. Before choosing a width, ask how a miss is scored and how width is scored, then pick the width with the best expected score given how often an interval that wide would contain the truth.
Calibration sits under both. Write 90 percent intervals for twenty quantities you can look up later, then count your misses. Most people miss far more than two, which means their intervals are too narrow.
The likelihood ranking question has you order statements by how probable they are, and the third part of one candidate's assessment, a Likelihood Test, sounds like the same task. Whatever the statements are, a few rules hold. A statement that adds a condition to another can never be more probable than it (P(A and B) <= P(A)). An "at least" statement contains its "exactly" version. Base rates outweigh vivid detail. Rank by containment first, then by base rate, and only then by judgment.
Apple piles, apartment floors and a Latin square proof
The puzzle family is small and varied, and every member ends in a claim you must justify: a minimum number of moves, a yes or no on whether a target can be reached, or a tight bound.
The apple piles question has two piles, and each move doubles one pile by moving exactly its current size over from the other. The question is when and how the piles can be made equal. Treat it like any reachability puzzle: look for a quantity no move changes, try a dozen small pairs by hand and tabulate which ones succeed, and only then propose a rule. A rule you have not tested against your own table is a guess, and a rule that fits the table still needs a sentence on why it holds.
The floor-layout question starts from apartments spread over four floors and a target arrangement, and asks for the fewest single-apartment moves. Minimum-move problems have two halves. A lower bound shows no sequence of moves can do better, often by counting what is out of place. A construction reaches that bound, and the care goes into the order of moves so that no floor breaks its target count along the way. An algorithm with no matching bound proves only an upper bound.
The Latin square question asks for a tight lower bound on the sum of the lower-triangle entries of an n by n grid in which each row and each column holds 1 through n once. Tight again means two parts: an argument that every such square reaches at least your number, and an explicit square that hits it. Work n = 2, 3 and 4 by hand, write the bound as a formula in n, and check it against each small case before you try the general proof.
Even the two puzzles tagged as coding turn on an argument. Code, if you write any, is short once the argument is settled, so talk through the invariant or the bound first.
An original prompt: quoting the highest of three dice
The following prompt is original, modeled on the betting and estimation questions above. You make a two-sided market in a contract that pays, in dollars, the highest face showing on three fair dice rolled after trading. Give a fair value, a bid and an ask. A counterparty then buys at your ask. How do you move your quote, and what changes if there is a chance the buyer has seen one die?
Fair value. Let M be the maximum. Use the tail-sum rule: P(M >= k) = 1 - ((k - 1)/6)^3. For k from 1 to 6 those probabilities are 216, 215, 208, 189, 152 and 91 out of 216, which add to 1071/216, about 4.958. Check it against the distribution: the maximum equals k with probability (k^3 - (k - 1)^3)/216, so 1, 7, 19, 37, 61 and 91 out of 216, and a six is the top face about 42 percent of the time. The value sits between 3.5, the mean of one die, and 6, and closer to 6, as it should.
Risk. The second moment is 5593/216, about 25.89, so the variance is about 1.31 and the standard deviation about 1.14, which sets the scale for the width.
The first quote. With nobody informed, center at 4.96 and quote 4.81 bid, 5.11 ask. A width of 0.30 is about a quarter of a standard deviation; each half-width of 0.15 is your expected take per contract from an uninformed counterparty, and it pays for holding the position until the roll.
What one die is worth. If someone knows one die shows d, the contract is worth the expected value of the larger of d and the maximum of the other two dice, which equals k with probability (2k - 1)/36. Working it through, d = 1 gives 161/36, about 4.47; d = 2 gives 4.50; d = 3 gives 4.61; d = 4 gives 4.86; d = 5 gives 5.31; and d = 6 gives 6.00. These six average back to 4.958, a useful check. Look at the spread: a low die barely moves the value, while a six moves it by more than a dollar. Against someone who always sees one die, every trade at your ask loses money, about 0.20 on a five and 0.89 on a six, because they buy only on those faces, and they sell to your 4.81 bid only on a one, two or three.
Updating after the trade. Suppose you think half your counterparties see a die and half do not, and an uninformed one buys half the time. An informed one buys with probability 1/3. The chance the buyer was informed, given the buy, is (1/2 * 1/3) / (1/2 * 1/3 + 1/2 * 1/2) = 2/5. An informed buy implies a value near the average of 5.31 and 6.00, about 5.65; an uninformed buy leaves 4.96. The updated value is 0.4 * 5.65 + 0.6 * 4.96, about 5.24, so move the center up by roughly 0.28. Then check the width. At 4.81/5.11 you earn 0.15 from an uninformed counterparty but lose about 0.32 on average to an informed one, so with half the flow informed the 0.30 spread loses about 0.09 per arrival. Around the old center the take turns positive only past a width of about 0.49, so quote wider than that, and say that the informed share of the flow now sets the width as much as the standard deviation does.
Follow-ups worth rehearsing: the same contract on the minimum, a second buy right after the first, a cap on your position, and two dice in place of three.
Three weeks from sequences to live quotes
Week one is speed. Every day, run a 25-minute timed block from the Optiver number-logic and code-matching questions, then write sequences of your own and swap them with a friend, since the bank alone runs out fast. Alongside it, work the rapid and take-home items in the Optiver probability and expectation drills in exact fractions, and drill the toolbox until you name the tool before you write anything.
Week two is structure. Take the octagon, bus and counters questions from the same drills one per day: solve, change a parameter, solve again, and check against a small case you can enumerate. Spend the other half of each session on the Optiver piles, floors and Latin square puzzles, writing both halves of each argument, bound and construction, in full sentences.
Week three is money. Work the Optiver betting, estimation and likelihood questions, then practice making markets out loud with a friend on contracts built from dice and cards, as in the worked prompt: fair value, width, a trade, an update. Do the calibration exercise with twenty intervals at the start of the week and again at the end. Close with one full timed run in the order one candidate describes: 25 minutes of sequences, 45 minutes of odds and expectation problems in place of Beat the Odds, and 25 minutes of likelihood ranking.
Quoting blind and two other slips
- Quoting a bid and ask before saying the fair value, which hides whether a mistake sits in the price or the width.
- Treating a counterparty's trade as noise instead of evidence about the value.
- Answering a question tagged machine learning with model talk when the prompt is a probability problem.