TRENDING12-Week Quant Interview Study Plan: Probability, Mental Math & Step-by-Step Solutions
About•Contact
THE PAGES DISPATCH

The Independent Journal of Quantitative Finance, Engineering & Careers • Est. 2026

Post a Role
Jobs BoardToolsStudy GuidesInterview VaultResearch JournalFirm DirectoryResume Review
About
About UsContact Us
Privacy PolicyTerms of Use
THE PAGES DISPATCH
Post Opening→
TOPICS:
Quantitative Trading•
Low-Latency C++•
Machine Learning & AI•
Market Making•
Brain Teasers•
Probability Proofs•
Salary Intelligence
EDITORIAL DISPATCH

Subscribe to the Quantitative Intelligence Briefing

Receive weekly updates, study guides, and new career opportunities directly to your inbox.

pagesxyz●

Independent educational resources, technical study curriculums, and interview preparation for quantitative finance and systems engineering.

Editorial Desks→
Interview Vault
  • Quant & Tech Resume BuilderPDF
  • Mental Math Speed TrainerDrill
  • Black-Scholes Options GreeksModel
  • Interactive Tools SuiteSuite
  • Probability Puzzles & ProofsVault
Curriculums
  • Quantitative Finance CurriculumStochastic
  • Artificial Intelligence FoundationsMulti-Agent
  • Machine Learning & Deep LearningArchitectures
  • Data Science & Statistical InferenceEconometrics
  • Low-Latency C++ & SystemsHigh-Speed
Editor's Picks★
  • Rust vs C++ in HFT Systems
    By Systems & Engineering Desk
  • Alternative Data & ML Alpha
    By Quantitative Research Desk
  • Resume Screening at Top Desks
    By Career & Talent Advisory
  • 2026 Quant Preparation Roadmap
    By Pages Editorial Team
  • Quant Salary & Bonus Guide
    By Career & Talent Advisory

© 2026 pagesxyz. All rights reserved.

Privacy Policy•Terms of Use•Contact

Quantitative Finance

Software EngineeringData ScienceMachine LearningArtificial Intelligence

Quantitative Finance

Software EngineeringData ScienceMachine LearningArtificial Intelligence
2,040 questions
2,040 questions
A drunk man starts at the origin on a number line. Each step he goes +1 or -1 with equal probability. What is the expected number of steps to reach +1 or -1 from the origin?Easy
A drunk man starts at the origin on a number line. Each step he goes +1 or -1 with equal probability. What is the expected number of steps to reach +1 or -1 from the origin?
Easy·
▶Worked Solution & Derivation
1. From the origin, the very first step takes him to either +1 or -1 with certainty. So the expected number of steps is exactly 1.
If you roll two fair six-sided dice, what is the probability the sum is exactly 7?Easy
If you roll two fair six-sided dice, what is the probability the sum is exactly 7?
Easy·
▶Worked Solution & Derivation
1/6. There are 36 total outcomes. The combinations summing to 7 are (1,6), (2,5), (3,4), (4,3), (5,2), (6,1) — that's 6 outcomes. 6/36 = 1/6.
When rolling two fair six-sided dice, what is the probability that at least one shows a 5?Easy
When rolling two fair six-sided dice, what is the probability that at least one shows a 5?
Easy·
▶Worked Solution & Derivation
11/36. The complement (no 5s) has probability (5/6)^2 = 25/36. So P(at least one 5) = 1 - 25/36 = 11/36.
What is the expected value of a single roll of a fair six-sided die?Easy
What is the expected value of a single roll of a fair six-sided die?
Easy·
▶Worked Solution & Derivation
3.5. E = (1+2+3+4+5+6)/6 = 21/6 = 3.5.
What is the probability of drawing two cards of the same suit from a 52-card deck without replacement?Easy
What is the probability of drawing two cards of the same suit from a 52-card deck without replacement?
Easy·
▶Worked Solution & Derivation
4/17. The first card can be anything. Then 12 of the remaining 51 cards match its suit. P = 12/51 = 4/17.
On average, how many times must you roll a fair die before seeing a 6?Easy
On average, how many times must you roll a fair die before seeing a 6?
Easy·
▶Worked Solution & Derivation
6. This is a geometric distribution with p = 1/6. Expected value = 1/p = 6.
What is the probability of rolling a sum of 11 with two fair six-sided dice?Easy
What is the probability of rolling a sum of 11 with two fair six-sided dice?
Easy·
▶Worked Solution & Derivation
1/18. Only (5,6) and (6,5) sum to 11. That's 2/36 = 1/18.
What is the probability of drawing a red card from a standard 52-card deck?Easy
What is the probability of drawing a red card from a standard 52-card deck?
Easy·
▶Worked Solution & Derivation
1/2. Hearts and Diamonds are red (26 cards). 26/52 = 1/2.
In a room of 10 people, if everyone shakes hands with everyone else exactly once, how many handshakes occur?Easy
In a room of 10 people, if everyone shakes hands with everyone else exactly once, how many handshakes occur?
Easy·
▶Worked Solution & Derivation
45. C(10,2) = 10 × 9 / 2 = 45.
Pick a random integer from 1 to 10. What is the probability it is prime?Easy
Pick a random integer from 1 to 10. What is the probability it is prime?
Easy·
▶Worked Solution & Derivation
2/5. Primes between 1 and 10: 2, 3, 5, 7. That's 4 out of 10 = 2/5.
A bag has 5 red and 5 blue marbles. Drawing two without replacement, what is the probability they are different colors?Easy
A bag has 5 red and 5 blue marbles. Drawing two without replacement, what is the probability they are different colors?
Easy·
▶Worked Solution & Derivation
5/9. Ways to pick one of each: 5 × 5 = 25. Total ways to pick 2: C(10,2) = 45. P = 25/45 = 5/9.
What is the probability of not rolling a 6 in three consecutive rolls of a fair die?Easy
What is the probability of not rolling a 6 in three consecutive rolls of a fair die?
Easy·
▶Worked Solution & Derivation
125/216. P(not 6) per roll = 5/6. For three independent rolls: (5/6)^3 = 125/216.
What is the probability a random person shares your exact birthday?Easy
What is the probability a random person shares your exact birthday?
Easy·
▶Worked Solution & Derivation
1/365. Assuming 365 equally likely days, exactly one matches yours.
What is the probability that the sum of two fair dice is even?Easy
What is the probability that the sum of two fair dice is even?
Easy·
▶Worked Solution & Derivation
1/2. Sum is even if both are even or both are odd. P = (1/2)(1/2) + (1/2)(1/2) = 1/2.
What is the probability of drawing a King or Queen from a standard 52-card deck?Easy
What is the probability of drawing a King or Queen from a standard 52-card deck?
Easy·
▶Worked Solution & Derivation
2/13. There are 4 Kings and 4 Queens = 8 cards. P = 8/52 = 2/13.
If you flip a coin 3 times, what is the probability of getting heads on all three flips?Easy
If you flip a coin 3 times, what is the probability of getting heads on all three flips?
Easy·
▶Worked Solution & Derivation
1/8. Each flip has P(H) = 1/2. For three independent flips: (1/2)^3 = 1/8.
What is the probability that two fair six-sided dice show the same number?Easy
What is the probability that two fair six-sided dice show the same number?
Easy·
▶Worked Solution & Derivation
1/6. The first die can be anything. The second must match, with probability 1/6.
If you pick a random letter from 'PROBABILITY', what is the probability it is a vowel?Easy
If you pick a random letter from 'PROBABILITY', what is the probability it is a vowel?
Easy·
▶Worked Solution & Derivation
4/11. The vowels are O, A, I, I — 4 vowels out of 11 letters.
What is the probability of drawing a face card (J, Q, K) from a standard deck?Easy
What is the probability of drawing a face card (J, Q, K) from a standard deck?
Easy·
▶Worked Solution & Derivation
3/13. There are 12 face cards in 52 cards. P = 12/52 = 3/13.
What is the probability you draw two cards of the same color from a standard 52-card deck without replacement?Easy
What is the probability you draw two cards of the same color from a standard 52-card deck without replacement?
Easy·
▶Worked Solution & Derivation
25/51. You draw any card first. Then there are 51 cards left and 25 of the same color. P = 25/51.
Given 100 coin flips, what is the probability that you get an even number of heads?Easy
Given 100 coin flips, what is the probability that you get an even number of heads?
Easy·
▶Worked Solution & Derivation
1/2. Whether there is an odd or even number of heads is determined by the final flip (50/50 chance), for any number of flips.
Suppose X,Y∼Unif⁡(0,n)X,Y \sim \unif{0}{n}X,Y∼Unif(0,n) for some integer n>0n > 0n>0 . Find the probability that ⌊X+Y⌋=⌊X⌋+⌊Y⌋\floor{X+Y} = \floor{X} + \floor{Y}⌊X+Y⌋=⌊X⌋+⌊Y⌋ when n=100n = 100n=100 .Easy
Suppose X,Y∼Unif⁡(0,n)X,Y \sim \unif{0}{n}X,Y∼Unif(0,n) for some integer n>0n > 0n>0 . Find the probability that ⌊X+Y⌋=⌊X⌋+⌊Y⌋\floor{X+Y} = \floor{X} + \floor{Y}⌊X+Y⌋=⌊X⌋+⌊Y⌋ when n=100n = 100n=100 .
Easy·
▶Worked Solution & Derivation

Hint: One can write any real number xxx as x=⌊x⌋+{x}x = \floor{x} + \{x\}x=⌊x⌋+{x} , where {x}\{x\}{x} is the fractional part of xxx (for example, 3.41=3+0.413.41 = 3 + 0.413.41=3+0.41 , and 0.410.410.41 is the fractional part). Therefore, the condition is here is that {x+y}={x}+{y}\{x+y\} = \{x\} + \{y\}{x+y}={x}+{y} . When does this hold true?

One can write any real number xxx as x=⌊x⌋+{x}x = \floor{x} + \{x\}x=⌊x⌋+{x} , where {x}\{x\}{x} is the fractional part of xxx (for example, 3.41=3+0.413.41 = 3 + 0.413.41=3+0.41 , and 0.410.410.41 is the fractional part). Therefore, x+y=⌊x+y⌋+{x+y}x+y = \floor{x+y} + \{x+y\}x+y=⌊x+y⌋+{x+y} , and similar for xxx and yyy individually. Thus, the condition we need to have true is {x+y}={x}+{y}\{x+y\} = \{x\} + \{y\}{x+y}={x}+{y} . This holds true exactly when {x}+{y}<1\{x\} + \{y\} < 1{x}+{y}<1 , as if it is at least 111 , {x+y}={x}+{y}−1\{x+y\} = \{x\} + \{y\} - 1{x+y}={x}+{y}−1 , as there would be able to be another integer subtracted out of x+yx+yx+y . Using this work above, we must compute P({X}+{Y}<1)\prob{\{X\} + \{Y\} < 1}P({X}+{Y}<1) . Since XXX and YYY are uniform on (0,n)(0,n)(0,n) and nnn is an integer, the fractional components of XXX and YYY are uniform on (0,1)(0,1)(0,1) . This should make intuitive sense, since if XXX is uniform on an integer-length interval, the fractional components should also be uniform, as all that is done in the fractional component is integer subtraction to make XXX wrap around (0,1)(0,1)(0,1) many times. This can be formally proven as follows: P({X}≤x)=P(⋃k=0n−1{k≤X≤k+x})\prob{\{X\} \leq x} = \prob{\displaystyle \bigcup_{k=0}^{n-1}\{k \leq X \leq k+x\}}P({X}≤x)=P(k=0⋃n−1​{k≤X≤k+x}) , as the fractional component being at most xxx means that XXX is within xxx of the previous integer kkk for some kkk . This generates nnn intervals of length xxx within the support (0,n)(0,n)(0,n) . These are also disjoint, as we must have x<1x < 1x<1 and the spacing between intervals is 111 . Therefore, as XXX is uniform, we can take ratios of areas to compute probabilities of events. The total length of the event of interest is nxnxnx , as there are nnn disjoint intervals of length xxx by the above. The total support is of length nnn , so P({X}≤x)=x\prob{\{X\} \leq x} = xP({X}≤x)=x , which is the CDF of a Unif⁡(0,1)\unif{0}{1}Unif(0,1) distribution. Now that this is proven, we know that {X},{Y}∼Unif⁡(0,1)\{X\}, \{Y\} \sim \unif{0}{1}{X},{Y}∼Unif(0,1) IID. This allows us to compute P({X}+{Y}<1)\prob{\{X\} + \{Y\} < 1}P({X}+{Y}<1) quite easily. Namely, we can draw out the region in the plane and note that this is the region below the line y=1−xy = 1-xy=1−x inside the unit square (0,1)×(0,1)(0,1) \times (0,1)(0,1)×(0,1) . This region is exactly 1/21/21/2 of the area of the support, so as we are dealing with uniform random variables, we can conclude that the probability is 1/21/21/2 , independent of nnn .
You have a 6−6-6− sided die before you with the values 1−61-61−6 on the sides. The 666 sides 1−61-61−6 , respectively, have probabilities 1/6,1/6,1/4−x,1/4−2x,1/6,1/6, 1/6, 1/4 - x, 1/4 - 2x, 1/6,1/6,1/6,1/4−x,1/4−2x,1/6, and 3x3x3x of appearing. Find the value of xxx that minimizes the probability of obtaining a sum of 777 when rolling the die twice.Easy
You have a 6−6-6− sided die before you with the values 1−61-61−6 on the sides. The 666 sides 1−61-61−6 , respectively, have probabilities 1/6,1/6,1/4−x,1/4−2x,1/6,1/6, 1/6, 1/4 - x, 1/4 - 2x, 1/6,1/6,1/6,1/4−x,1/4−2x,1/6, and 3x3x3x of appearing. Find the value of xxx that minimizes the probability of obtaining a sum of 777 when rolling the die twice.
Easy·
▶Worked Solution & Derivation

Hint: You can obtain a sum of 777 by obtaining (1,6),(2,5),(1,6), (2,5),(1,6),(2,5), or (3,4)(3,4)(3,4) in some order on the dice. Add up the probabilities of obtaining some permutation of each of these pairs as a function of xxx .

You can obtain a sum of 777 by obtaining (1,6),(2,5),(1,6), (2,5),(1,6),(2,5), or (3,4)(3,4)(3,4) in some order on the dice. There are 2!=22! = 22!=2 arrangements of the values onto these dice per pair. To get the total probability of obtaining a sum of 777 , we should add up the probabilities of obtaining some permutation of each of these pairs as a function of xxx . 111 and 666 have probability 1/61/61/6 and 3x3x3x of appearing, respectively. So, the probability here is 2⋅16⋅3x=x2 \cdot \frac{1}{6} \cdot 3x = x2⋅61​⋅3x=x of obtaining some permutation of (1,6)(1,6)(1,6) . 222 and 555 both have probability 1/61/61/6 of appearing, so some permutation of this appears with probability 2⋅16⋅16=1182 \cdot \frac{1}{6} \cdot \frac{1}{6} = \frac{1}{18}2⋅61​⋅61​=181​ . Lastly, 333 and 444 appear with respective probabilities 1/4−x1/4 - x1/4−x and 1/4−2x1/4 - 2x1/4−2x , so the probability of some permutation of these appearing is 2⋅(14−x)(14−2x)=4x2−32x+182 \cdot \left(\frac{1}{4}-x\right)\left(\frac{1}{4} -2x\right) = 4x^2 - \frac{3}{2}x + \frac{1}{8}2⋅(41​−x)(41​−2x)=4x2−23​x+81​ . Adding all of these disjoint cases up, the probability, as a function of xxx , of obtaining a sum of 777 is, p(x)=4x2−32x+18+x+116=4x2−12x+316p(x) = 4x^2 - \frac{3}{2}x + \frac{1}{8} + x + \frac{1}{16} = 4x^2 - \frac{1}{2}x + \frac{3}{16}p(x)=4x2−23​x+81​+x+161​=4x2−21​x+163​ We need to optimize this in xxx . This can be done by taking the derivative. Namely, p′(x)=8x−1/2=0  ⟺  x=116p'(x) = 8x - 1/2 = 0 \iff x = \frac{1}{16}p′(x)=8x−1/2=0⟺x=161​ .
Claire and Jeff, respectively, start with $a\$a$a and $b\$b$b each. They bet $1\$1$1 at a time on opposite outcomes of a fair coin. However, Claire does not have a quitters mentality in gambling. She feels she is eventually always going to win big, and believes in second chances. Therefore, if Claire bankrupts, she will buy in again with $c\$c$c , while Jeff will continue with the has the stack he won. If Claire bankrupts again, she loses the game. Find the probability Claire bankrupts Jeff when a=20,b=25,a = 20, b = 25,a=20,b=25, and c=30c = 30c=30 .Easy
Claire and Jeff, respectively, start with $a\$a$a and $b\$b$b each. They bet $1\$1$1 at a time on opposite outcomes of a fair coin. However, Claire does not have a quitters mentality in gambling. She feels she is eventually always going to win big, and believes in second chances. Therefore, if Claire bankrupts, she will buy in again with $c\$c$c , while Jeff will continue with the has the stack he won. If Claire bankrupts again, she loses the game. Find the probability Claire bankrupts Jeff when a=20,b=25,a = 20, b = 25,a=20,b=25, and c=30c = 30c=30 .
Easy·
▶Worked Solution & Derivation

Hint: Claire bankrupts Jeff by either bankrupting him with their original stacks or by being bankrupt herself and then coming back to bankrupt him with her new stack. Consider these two cases separately.

Claire bankrupts Jeff by either bankrupting him with their original stacks or by being bankrupt herself and then coming back to bankrupt him with her new stack. Therefore, as these are disjoint, consider these two cases separately. Claire bankrupts Jeff with her original stack with probability aa+b\frac{a}{a+b}a+ba​ , as we can view this problem as symmetric Gambler's Ruin, but we are looking at the probability of Jeff being ruined, which would be aa+b\frac{a}{a+b}a+ba​ by the classic Gambler's Ruin formulas. Alternatively, with probability ba+b\frac{b}{a+b}a+bb​ , Claire is ruined herself. Jeff would have a stack of size a+ba+ba+b , while Claire has a stack of size ccc upon rebuying. Given that Claire bankrupted, the probability she wins post-bankrupting is ca+b+c\frac{c}{a+b+c}a+b+cc​ , as there is now a+b+ca+b+ca+b+c total money in the game, and we want the probability Jeff, who has a+ba+ba+b , is ruined. Adding up these cases together, we get that the answer is aa+b+ba+b⋅ca+b+c=a(a+b+c)+bc(a+b)(a+b+c)=(a+b)(a+c)(a+b)(a+b+c)=a+ca+b+c\frac{a}{a+b} + \frac{b}{a+b} \cdot \frac{c}{a+b+c} = \frac{a(a+b+c) + bc}{(a+b)(a+b+c)} = \frac{(a+b)(a+c)}{(a+b)(a+b+c)} = \frac{a+c}{a+b+c}a+ba​+a+bb​⋅a+b+cc​=(a+b)(a+b+c)a(a+b+c)+bc​=(a+b)(a+b+c)(a+b)(a+c)​=a+b+ca+c​ This answer makes a lot of intuitive sense. You can instead view this problem as Claire having a+ca+ca+c total money in her bankroll from the start and going against Jeff, who has bbb , and this approach would yield the answer that is observed. With the specified values, the answer is 2/32/32/3 .
A sniper is shooting at targets. There are rrr columns of identical targets, with column iii , 1≤i≤n1 \leq i \leq n1≤i≤n , having nin_ini​ targets in it stacked vertically. The sniper first selects a column and then shoots the lowest-hanging target in that column that is not broken. Once a column is out of targets, it is no longer able to be selected. In how many distinct orders can the sniper break all the targets? Solve this when n=5n = 5n=5 and ni=in_i = ini​=i .Easy
A sniper is shooting at targets. There are rrr columns of identical targets, with column iii , 1≤i≤n1 \leq i \leq n1≤i≤n , having nin_ini​ targets in it stacked vertically. The sniper first selects a column and then shoots the lowest-hanging target in that column that is not broken. Once a column is out of targets, it is no longer able to be selected. In how many distinct orders can the sniper break all the targets? Solve this when n=5n = 5n=5 and ni=in_i = ini​=i .
Easy·
▶Worked Solution & Derivation

Hint: Each order of breaking the targets is equivalent to some anagram of length n1+⋯+nrn_1 + \dots + n_rn1​+⋯+nr​ , where the iii th spot being 1≤j≤n1 \leq j \leq n1≤j≤n is saying that a target in column jjj was shot on the iii th turn.

Each order of breaking the targets is equivalent to some anagram of length n1+⋯+nrn_1 + \dots + n_rn1​+⋯+nr​ , where the iii th spot being 1≤j≤n1 \leq j \leq n1≤j≤n is saying that a target in column jjj was shot on the iii th turn. In other words, we can view the sequence of breaking as a string of length n1+⋯+nrn_1 + \dots + n_rn1​+⋯+nr​ , where there are nin_ini​ occurrences of iii in the string. This is because every target needs to be broken, and there are nin_ini​ targets in column iii , so the sniper must shoot at column iii nin_ini​ times to make it completely empty. The question of counting anagrams is a much simpler one. The number of anagrams is given by (n1+⋯+nrn1,…,nr)=(n1+⋯+nr)!n1!…nr!\binom{n_1 + \dots + n_r}{n_1,\dots, n_r} = \frac{(n_1 + \dots + n_r)!}{n_1!\dots n_r!}(n1​,…,nr​n1​+⋯+nr​​)=n1​!…nr​!(n1​+⋯+nr​)!​ . With the specific values in the question, the answer is 15!1!2!3!4!5!=37837800\frac{15!}{1!2!3!4!5!} = 378378001!2!3!4!5!15!​=37837800 .
Suppose that X∼Unif⁡(a,b)X \sim \unif{a}{b}X∼Unif(a,b) . Find Var⁡(X)\var{X}Var(X) when a=0a = 0a=0 and b=1b = 1b=1 .Easy
Suppose that X∼Unif⁡(a,b)X \sim \unif{a}{b}X∼Unif(a,b) . Find Var⁡(X)\var{X}Var(X) when a=0a = 0a=0 and b=1b = 1b=1 .
Easy·
▶Worked Solution & Derivation

Hint: The best approach is to write Var⁡(X)=E[X2]−(E[X])2\var{X} = \ev{X^2} - (\ev{X})^2Var(X)=E[X2]−(E[X])2 . Both of these can be computed via LOTUS.

The best approach here is to write Var⁡(X)=E[X2]−(E[X])2\var{X} = \ev{X^2} - (\ev{X})^2Var(X)=E[X2]−(E[X])2 . Both of these can be computed via LOTUS easily. The PDF of X∼Unif⁡(a,b)X \sim \unif{a}{b}X∼Unif(a,b) is f(x)=1b−aI(a,b)(x)f(x) = \frac{1}{b-a}I_{(a,b)}(x)f(x)=b−a1​I(a,b)​(x) . Therefore, we have E[X]=∫abxf(x)dx=∫01x⋅1b−adx=12(b−a)x2∣ab=b2−a22(b−a)=b+a2\ev{X} = \int_a^b xf(x)dx = \int_0^1 x \cdot \frac{1}{b-a}dx = \frac{1}{2(b-a)}x^2\big|_a^b = \frac{b^2-a^2}{2(b-a)} = \frac{b+a}{2}E[X]=∫ab​xf(x)dx=∫01​x⋅b−a1​dx=2(b−a)1​x2​ab​=2(b−a)b2−a2​=2b+a​ Similarly, we can compute E[X2]=∫abx2f(x)dx=∫01x2⋅1b−adx=b3−a33(b−a)=a2+ab+b23\ev{X^2} = \int_a^b x^2f(x)dx = \int_0^1 x^2 \cdot \frac{1}{b-a}dx = \frac{b^3-a^3}{3(b-a)} = \frac{a^2 + ab + b^2}{3}E[X2]=∫ab​x2f(x)dx=∫01​x2⋅b−a1​dx=3(b−a)b3−a3​=3a2+ab+b2​ Plugging these values in and performing some algebraic reduction, we have Var⁡(X)=a2+b2+ab3−a2+2ab+b24=(b−a)212\var{X} = \frac{a^2 + b^2 + ab}{3} - \frac{a^2 + 2ab + b^2}{4} = \frac{(b-a)^2}{12}Var(X)=3a2+b2+ab​−4a2+2ab+b2​=12(b−a)2​ With the requested values, the answer is 1/121/121/12 .
Dan enjoys savoring his food, so takes a uniformly random time between 222 and 777 minutes to eat a cookie. If he has not finished eating the cookie after 444 minutes, find the probability that Dan finishes eating the cookie in the next minute.Easy
Dan enjoys savoring his food, so takes a uniformly random time between 222 and 777 minutes to eat a cookie. If he has not finished eating the cookie after 444 minutes, find the probability that Dan finishes eating the cookie in the next minute.
Easy·
▶Worked Solution & Derivation

Hint: Let TTT be the amount of time that Dan takes to eat the cookie. We are looking to compute P(T≤4+1∣T≥4)\prob{T \leq 4 + 1 \mid T \geq 4}P(T≤4+1∣T≥4) , as we want the probability that he finishes the cookie in the next minute given he took at least 444 minutes.

Let TTT be the amount of time that Dan takes to eat the cookie. We are looking to compute P(T≤4+1∣T≥4)\prob{T \leq 4 + 1 \mid T \geq 4}P(T≤4+1∣T≥4) , as we want the probability that he finishes the cookie in the next minute given he took at least 444 minutes. Using the definition of conditional probability, P(T≤5∣T≥4)=P(4≤T≤5)P(T≥4)\prob{T \leq 5 \mid T \geq 4} = \frac{\prob{4 \leq T \leq 5}}{\prob{T \geq 4}}P(T≤5∣T≥4)=P(T≥4)P(4≤T≤5)​ Since T∼Unif⁡(2,7)T \sim \unif{2}{7}T∼Unif(2,7) by the question, we can take ratios of lengths of intervals to compute the probability. In particular, P(T≥4)=3/5\prob{T \geq 4} = 3/5P(T≥4)=3/5 , as the total interval is of length 7−2=57-2 = 57−2=5 , while the event is of length 7−4=37-4=37−4=3 . Similarly, we have P(4≤T≤5)=1/5\prob{4 \leq T \leq 5} = 1/5P(4≤T≤5)=1/5 , as the event is of length 111 here. Therefore, the answer is 1/31/31/3 .
A bowl consists of nnn red and nnn blue marbles. Marbles are drawn from this bag one-by-one without replacement until there are no marbles left in the bag. The order that the marbles are drawn in is noted. Once the marbles are drawn out, you count the number of runs in your sequence, where a run is defined as a maximal contiguous sequence of the same outcome. For example, BBRBRRBBRBRRBBRBRR has 444 runs. Find the expected amount of runs in your sequence when n=100n = 100n=100 .Easy
A bowl consists of nnn red and nnn blue marbles. Marbles are drawn from this bag one-by-one without replacement until there are no marbles left in the bag. The order that the marbles are drawn in is noted. Once the marbles are drawn out, you count the number of runs in your sequence, where a run is defined as a maximal contiguous sequence of the same outcome. For example, BBRBRRBBRBRRBBRBRR has 444 runs. Find the expected amount of runs in your sequence when n=100n = 100n=100 .
Easy·
▶Worked Solution & Derivation

Hint: The number of runs is equal to the number of starts of runs, as every single run must have a start.

Let XiX_iXi​ be the indicator of the event that the iii th marble drawn out is the start of a new run. T=X1+X2+⋯+X2nT = X_1 + X_2 + \dots + X_{2n}T=X1​+X2​+⋯+X2n​ gives the total number of runs.

All of these except one are identically distributed.

The number of runs is equal to the number of starts of runs, as every single run must have a start. Since we are looking for the expected count of something occurring in sampling without replacement, linearity of expectation is the way to go. The first task is to set up appropriate indicators. Since we want to count the expected number of runs, let XiX_iXi​ be the indicator of the event that the iii th marble drawn out is the start of a new run. T=X1+X2+⋯+X2nT = X_1 + X_2 + \dots + X_{2n}T=X1​+X2​+⋯+X2n​ gives the total number of runs in our sequence. Note that all of these except one are identically distributed. Namely, X1=1X_1 = 1X1​=1 always, as there is no marble prior to it that it needs to differ in color from, so it must be the start of a run. However, the other 2n−12n-12n−1 random variables are all exchangeable, as we are sampling without replacement and the probability of being the start of a new run only depends on there being a previous marble to compare to, in which all of them have a marble to compare to. By linearity of expectation and exchangeability, E[T]=1+(2n−1)E[X2]\ev{T} = 1 + (2n-1)\ev{X_2}E[T]=1+(2n−1)E[X2​] Note that we have to choose X2X_2X2​ since X1X_1X1​ has a different distribution than the rest. E[X2]\ev{X_2}E[X2​] is the probability that the second marble drawn is the start of a new run. This means that the color of the first and second marbles drawn differ. Since each marble color is equally likely for the first draw, we can fix it arbitrarily. WLOG, say it is red. To start a new run, the second marble must be blue. There are nnn blue marbles in the bowl at this point out of 2n−12n-12n−1 total, as we sample without replacement, so E[X2]=n2n−1\ev{X_2} = \frac{n}{2n-1}E[X2​]=2n−1n​ . Plugging this in, E[T]=n+1\ev{T} = n+1E[T]=n+1 . With n=100n = 100n=100 , the answer is 101101101 .
An ellipse is centered at the origin. Let AAA and BBB be the horizontal and vertical radii lengths, respectively. Assume that A,B∼Exp(1)A,B\sim \text{Exp}(1)A,B∼Exp(1) IID. The area of an ellipse with radii aaa and bbb is given by πab\pi abπab . A circle with diameter AAA is also created. Find the probability that the area of the circle is larger than the area of the ellipse.Easy
An ellipse is centered at the origin. Let AAA and BBB be the horizontal and vertical radii lengths, respectively. Assume that A,B∼Exp(1)A,B\sim \text{Exp}(1)A,B∼Exp(1) IID. The area of an ellipse with radii aaa and bbb is given by πab\pi abπab . A circle with diameter AAA is also created. Find the probability that the area of the circle is larger than the area of the ellipse.
Easy·
▶Worked Solution & Derivation

Hint: The radius of the circle is A/2A/2A/2 , so the area is π4A2\frac{\pi}{4}A^24π​A2 . The area of the ellipse is πAB\pi ABπAB . Get an event in terms of AAA and BBB .

The radius of the circle is A/2A/2A/2 , as AAA is the diameter, so the area is π4A2\frac{\pi}{4}A^24π​A2 . The area of the ellipse is πAB\pi ABπAB by the formula in the question. This question is asking us to find the probability that the area of the circle is larger than the area of the ellipse. In other words, we want P(π4A2>πAB)=P(A>4B)\prob{\frac{\pi}{4}A^2 > \pi AB} = \prob{A > 4B}P(4π​A2>πAB)=P(A>4B) , where A,B∼Expo⁡(1)A,B \sim \exponential{1}A,B∼Expo(1) IID. By independence, the joint PDF of AAA and BBB is f(a,b)=e−aI(0,∞)(a)⋅e−bI(0,∞)(b)=e−(a+b)I(0,∞)(a)I(0,∞)(b)f(a,b) = e^{-a}I_{(0,\infty)}(a) \cdot e^{-b}I_{(0,\infty)}(b) = e^{-(a+b)}I_{(0,\infty)}(a)I_{(0,\infty)}(b)f(a,b)=e−aI(0,∞)​(a)⋅e−bI(0,∞)​(b)=e−(a+b)I(0,∞)​(a)I(0,∞)​(b) . If we put BBB on the x−x-x− axis and AAA on the y−y-y− axis, the region of integration is above the line a=4ba = 4ba=4b , which can be viewed as y=4xy = 4xy=4x in the normal plane. Setting up the bounds of integration in the integral, we have that P(A>4B)=∫0∞∫4b∞e−a⋅e−bdadb=∫0∞e−b∫4b∞e−adadb=∫0∞e−5bdb=15\prob{A > 4B} = \int_0^{\infty} \int_{4b}^{\infty} e^{-a} \cdot e^{-b}dadb = \int_0^{\infty} e^{-b}\int_{4b}^{\infty}e^{-a}dadb = \int_0^{\infty} e^{-5b}db = \frac{1}{5}P(A>4B)=∫0∞​∫4b∞​e−a⋅e−bdadb=∫0∞​e−b∫4b∞​e−adadb=∫0∞​e−5bdb=51​ We can take out e−be^{-b}e−b from the inner integral since the inner integral integrates with respect to aaa only.
Suppose that X,Y∼Expo⁡(λ)X,Y \sim \exponential{\lambda}X,Y∼Expo(λ) IID and fix k>0k > 0k>0 . Find P(Y>kX)\prob{Y > kX}P(Y>kX) when λ=3\lambda = 3λ=3 and k=5k = 5k=5 .Easy
Suppose that X,Y∼Expo⁡(λ)X,Y \sim \exponential{\lambda}X,Y∼Expo(λ) IID and fix k>0k > 0k>0 . Find P(Y>kX)\prob{Y > kX}P(Y>kX) when λ=3\lambda = 3λ=3 and k=5k = 5k=5 .
Easy·
▶Worked Solution & Derivation

Hint: Sketch this region out in the plane and integrate over the joint PDF of XXX and YYY .

Since we are looking to compute some type of probability in two random variables and the region isn't symmetric, we should sketch the region out in the plane and integrate over the joint PDF of XXX and YYY . Since XXX and YYY are independent, the joint PDF of XXX and YYY is f(x,y)=λe−λxI(0,∞)(x)⋅λe−λy1[0,∞](y)f(x,y) = \lambda e^{-\lambda x}I_{(0,\infty)}(x) \cdot \lambda e^{-\lambda y}\I{0}{\infty}(y)f(x,y)=λe−λxI(0,∞)​(x)⋅λe−λy1[0,∞]​(y) . We can now set up the integral as P(Y>kX)=∫0∞∫kx∞λe−λx⋅λe−λydydx=∫0∞λe−λx∫kx∞λe−λydy=∫0∞λe−λ(k+1)xdx=1k+1\prob{Y > kX} = \int_0^{\infty} \int_{kx}^{\infty} \lambda e^{-\lambda x} \cdot \lambda e^{-\lambda y}dydx = \int_0^{\infty} \lambda e^{-\lambda x}\int_{kx}^{\infty} \lambda e^{-\lambda y}dy = \int_0^{\infty} \lambda e^{-\lambda(k+1)x}dx = \frac{1}{k+1}P(Y>kX)=∫0∞​∫kx∞​λe−λx⋅λe−λydydx=∫0∞​λe−λx∫kx∞​λe−λydy=∫0∞​λe−λ(k+1)xdx=k+11​ With the specified values, the answer is 1/61/61/6 . Note that there is an intuitive interpretation of this. We can view the exponential random variables as waiting times until some event occurs. kXkXkX is essentially scaling time by kkk so that the waiting time between events is kkk times as long. Therefore, the expected number of events that occur per unit time is now λ/k\lambda/kλ/k instead of λ\lambdaλ . Thus, the event {Y>kX}\{Y > kX\}{Y>kX} is really saying that one of the events that occurs with average rate λ/k\lambda/kλ/k per unit time is the first to occur. The total average rate of events per unit time is λ+λ/k\lambda + \lambda/kλ+λ/k , and λ/k\lambda/kλ/k of those belong to the process for which XXX is an interarrival distribution, so the probability that the first event to occur is from the process with XXX is λ/kλ+λ/k=11+k\frac{\lambda/k}{\lambda +\lambda/k} = \frac{1}{1+k}λ+λ/kλ/k​=1+k1​
Showing 30 of 2,040 interview questions