INTERVIEW PREP

数学与非代码面试题

覆盖数学、概率、统计、脑筋急转弯、机器学习和金融。这里负责筛选和进入单题;编程题使用独立的 LeetCode 式 coding lab。

题目
4169
领域
8
当前筛选
19

1 / 1

非代码面试题

显示 19 / 19 道匹配题目

答题状态:未尝试未正确已正确
080The Two-Envelope ParadoxTwo envelopes each contain a positive amount of money; one contains exactly twice the other. You pick one envelope at random and find it contains x dollars. The naive argument says: the other envelope is equally likely to contain 2x or x/2, so the expected value of switching is (1/2)(2x) + (1/2)(x/2) = 5x/4 > x, and you should always switch — but this leads to the absurd conclusion that you should switch back and forth indefinitely. (a) Identify the precise flaw in the naive argument. (b) Suppose the smaller amount S is drawn from a known proper prior distribution with E[S] = < . Show that the unconditional expected gain from switching is zero. (c) Explain why conditional on observing x, it *can* be rational to switch for some values of x and not others.概率困难derivation未尝试面试订阅082The Sleeping Beauty ProblemSleeping Beauty participates in the following experiment. On Sunday she is put to sleep. A fair coin is flipped. If it lands Heads, she is woken on Monday only. If it lands Tails, she is woken on Monday and again on Tuesday (with her memory of the Monday awakening erased before Tuesday). Each time she wakes, she is asked: 'What is your credence that the coin landed Heads?' She knows the full protocol. (a) Present the argument that her answer should be 1/3 (the 'thirder' position). (b) Present the argument that her answer should be 1/2 (the 'halfer' position). (c) Suppose the experiment is repeated 1000 times independently. If Beauty bets \1 at even odds on Heads each time she is woken, what is her expected net gain or loss over all awakenings? What does this imply about the two positions?概率中等derivation未尝试免费408PDF of the Second Smallest ExponentialLet X 1, X 2, X 3, X 4 be independent Exp (1) random variables. Derive the PDF of the second order statistic X (2) .概率中等derivation未尝试免费411Probability Involving the Third Order StatisticLet X 1, X 2, X 3, X 4 be independent Uniform (0,1) random variables. Compute P(X (3) < 0.5), where X (3) is the third smallest.概率简单数值题未尝试免费416Second Smallest of Four UniformsLet X 1, X 2, X 3, X 4 be independent Uniform (0,1) random variables. Compute E[X (2) ].概率简单数值题未尝试免费421CDF of the Minimum of Four UniformsLet X 1, X 2, X 3, X 4 be independent Uniform (0,1) random variables. Derive the CDF and PDF of X (1) = \min(X 1, X 2, X 3, X 4).概率简单derivation未尝试免费424Expected Gap Between the Two Largest UniformsLet X 1, \ldots, X 6 be iid Uniform (0,1). Find the expected gap between the largest and second-largest values: E[X (6) - X (5) ].概率中等数值题未尝试免费478Lazy Random Walk Hitting TimeA particle moves on \ 0, 1, 2, 3, 4, 5\ . At each step from state i (0 < i < 5), it stays at i with probability \tfrac 1 3 , moves to i-1 with probability \tfrac 1 3 , and moves to i+1 with probability \tfrac 1 3 . State 0 is reflecting: from 0 the particle moves to 1 with probability \tfrac 2 3 and stays at 0 with probability \tfrac 1 3 . State 5 is absorbing. Starting from state 0, derive the expected number of steps to reach state 5.概率中等derivation未尝试免费484Hitting Time on a Product of Two-State ChainsLet (X n, Y n) be a Markov chain on \ 0,1\ 2 where X n and Y n evolve independently. At each step, X n flips (i.e., X n+1 = 1 - X n) with probability \tfrac 1 3 and stays with probability \tfrac 2 3 . Similarly, Y n flips with probability \tfrac 1 2 and stays with probability \tfrac 1 2 . Starting from (X 0, Y 0) = (1, 1), compute the expected number of steps to first reach the state (0, 0).概率中等derivation未尝试免费488First Passage with Parity-Dependent TransitionsConsider a Markov chain on \ 0, 1, 2, 3\ where states 0 and 3 are absorbing. The transition probabilities for transient states depend on the parity of the state: - From any **odd** state i: p(i, i-1) = \tfrac 3 4 , p(i, i+1) = \tfrac 1 4 . - From any **even** transient state i (i.e., i = 2): p(i, i-1) = \tfrac 1 4 , p(i, i+1) = \tfrac 3 4 . Compute E[T \mid X 0 = 1] where T = \inf\ n \ge 0 : X n \in \ 0, 3\ \ .概率中等derivation未尝试免费493Expected Absorption Time with Increasing DriftA Markov chain on \ 0, 1, 2, 3, 4\ has absorbing states 0 and 4. The transition probabilities for transient states are: p(1,0) = \tfrac 1 5 , \quad p(1,2) = \tfrac 4 5 , \quad p(2,1) = \tfrac 2 5 , \quad p(2,3) = \tfrac 3 5 , \quad p(3,2) = \tfrac 3 5 , \quad p(3,4) = \tfrac 2 5 . Compute E[T \mid X 0 = 1] and E[T \mid X 0 = 3], where T = \inf\ n \ge 0 : X n \in \ 0, 4\ \ .概率中等derivation未尝试免费498Hitting Time with Interior Reflecting BarrierA Markov chain on \ 0, 1, 2, 3, 4\ has the following transitions: - State 0 is absorbing. - From state 1: p(1, 0) = \tfrac 1 2 , p(1, 2) = \tfrac 1 2 . - From state 2: p(2, 1) = \tfrac 1 3 , p(2, 3) = \tfrac 2 3 . - From state 3: p(3, 2) = \tfrac 1 2 , p(3, 4) = \tfrac 1 2 . - From state 4: p(4, 3) = 1 (reflecting barrier). Compute E[T 0 \mid X 0 = 3].概率中等derivation未尝试免费2721Unit and Domino Tilings of a Nine-Cell StripA strip of length 9 is tiled using monomers of length 1 and dominoes of length 2. Derive the generating function for the number a n of tilings, and compute a 9.脑筋急转弯简单数值题未尝试面试订阅2726Subset Count With Cardinality Divisible by ThreeHow many subsets of a 10-element set have size divisible by 3? Solve it with a roots-of-unity filter or an equivalent generating-function argument.脑筋急转弯中等derivation未尝试面试订阅2728Ternary Strings With a Modular Count of One SymbolHow many strings of length 8 over the alphabet A,B,C contain a number of As congruent to 2 modulo 3?脑筋急转弯中等derivation未尝试面试订阅2731Coefficient in a Product of Short Generating FunctionsFind the coefficient of x 12 in (1+x+x 2) 4 (1+x 2+x 4) 2.脑筋急转弯中等derivation未尝试面试订阅2733Payment Combinations With an Odd Number of Nine-Unit NotesA cashier can use 2-unit, 5-unit, and 9-unit notes to make total payment 24. The number of 9-unit notes must be odd. Order does not matter. How many valid combinations exist?脑筋急转弯中等derivation未尝试面试订阅2740Coefficient in 1/((1-x^2)^2(1-x^3))Find the coefficient of x 10 in 1/((1-x 2) 2(1-x 3)).脑筋急转弯中等derivation未尝试面试订阅5907Kelly with a Proportional Trading CostOn an even-money coin with win probability p, each round you pay a proportional cost c on the amount staked, regardless of the outcome. So staking fraction f, a win multiplies wealth by 1+f(1-c) and a loss by 1-f(1+c). Derive the growth-optimal fraction f * in terms of p and c, evaluate it for p=0.6,\ c=0.05, and find the cost level at which the optimal stake drops to zero.概率困难数值题未尝试面试订阅