INTERVIEW PREP

数学与非代码面试题

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

题目
4169
领域
8
当前筛选
18

1 / 1

非代码面试题

显示 18 / 18 道匹配题目

答题状态:未尝试未正确已正确
076Monty Hall with an Ignorant HostIn a game show, three doors hide one car and two goats. You pick Door 1. The host, who does **not** know where the car is, opens Door 3 and it happens to reveal a goat. Given that the host revealed a goat (rather than accidentally revealing the car), what is the probability that the car is behind Door 2? Compare this with the classic Monty Hall problem where the host always knowingly reveals a goat.概率简单数值题未尝试免费077The Tuesday Boy ProblemA family has exactly two children. You learn that at least one child is a boy who was born on a Tuesday. Assume each child is equally likely to be a boy or a girl, and equally likely to be born on any of the seven days of the week, all independently. What is the probability that both children are boys?概率简单数值题未尝试免费078Simpson's Paradox in a Clinical TrialA clinical trial tests a drug on two subgroups. In subgroup A (mild cases): 81/87 (93%) of treated patients recover vs 234/270 (87%) of untreated. In subgroup B (severe cases): 192/263 (73%) of treated patients recover vs 55/80 (69%) of untreated. The drug improves recovery rates in both subgroups. Now compute the overall recovery rates (combining subgroups) for treated vs untreated. Explain the apparent contradiction and identify the lurking variable that causes it.概率中等derivation未尝试免费079Four-Door Monty HallThere are four doors: one hides a car, the other three hide goats. You pick Door 1. The host, who knows where the car is, opens one of the remaining doors to reveal a goat (choosing uniformly at random among the goat doors he can open). He opens Door 4. You are now given two options: (a) stick with Door 1, or (b) switch to one of the two unopened doors (Door 2 or Door 3), chosen uniformly at random. What is the probability of winning the car under each option? Is there a third strategy that does even better?概率中等数值题未尝试免费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未尝试面试订阅081Bertrand's Box ParadoxThree boxes each contain two coins. Box 1 has two gold coins, Box 2 has one gold and one silver coin, and Box 3 has two silver coins. You pick a box uniformly at random, then draw one coin at random from that box. The coin you draw is gold. What is the probability that the other coin in the same box is also gold?概率简单数值题未尝试免费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未尝试免费083The Necktie ParadoxTwo players, Alice and Bob, each receive a necktie as a gift. The prices of the two neckties are different positive values. Neither player knows either price. They agree to compare: whoever has the cheaper necktie wins the other's necktie. Alice reasons: 'If my necktie costs x, then I either gain a necktie worth more than x or lose a necktie worth x. Since each is equally likely, my expected gain from the game is positive.' Bob makes the identical argument. Both conclude the game favors them — a contradiction since this is a zero-sum exchange. (a) Identify the precise flaw in Alice's reasoning. (b) Suppose the two necktie prices are drawn by a third party as V and 2V where V \sim Uniform (1, 100), assigned randomly to Alice and Bob. If Alice sees her necktie has price tag x, what is her expected gain from the game as a function of x? Show that the unconditional expected gain is zero.概率中等derivation未尝试免费084Nontransitive DiceThree dice have the following faces. Die A: 2, 2, 4, 4, 9, 9 . Die B: 1, 1, 6, 6, 8, 8 . Die C: 3, 3, 5, 5, 7, 7 . Each die is fair (all six faces equally likely). Two players each choose a die and roll it; the higher number wins. (a) Compute P(A > B), P(B > C), and P(C > A). (b) Show that these dice are nontransitive: A tends to beat B, B tends to beat C, yet C tends to beat A. (c) You are in a game where your opponent chooses a die first, then you choose. Which die should you pick in each case, and what is your winning probability?概率中等数值题未尝试免费085The Inspection Paradox (Bus Waiting Time)Buses arrive at a stop according to a Poisson process with rate (so inter-arrival times are iid Exp ( ) with mean 1/ ). You arrive at the bus stop at a uniformly random time, independent of the bus schedule. Let L be the length of the inter-arrival interval that contains your arrival time — i.e., the time between the last bus before you arrived and the next bus after. (a) Find E[L]. Explain why it is **not** 1/ despite inter-arrival times having mean 1/ . (b) Find the expected waiting time E[W] until the next bus, where W is the time from your arrival until the next bus. (c) A city official surveys bus riders and asks how long they waited. If the reported average is 1/ , should the transit authority be surprised? Explain using the inspection paradox.概率困难derivation未尝试面试订阅086The Birthday ParadoxAssume birthdays are uniformly distributed over 365 days (ignore leap years). (a) What is the exact probability that in a room of 23 people, at least two share a birthday? (b) Derive a simple approximation for the number of people n needed so that the probability of a shared birthday exceeds 1/2. (c) A trading desk has 50 traders. A manager claims that having two traders share a birthday is 'a remarkable coincidence.' Is the manager correct? Compute the probability and comment.概率简单数值题未尝试免费087The Gambler's Fallacy and the Hot-Hand FallacyA fair coin is flipped 100 times. (a) Conditional on the coin having just landed Heads three times in a row, what is the probability the next flip is Heads? A gambler insists it should be less than 1/2 because the coin 'is due for Tails.' Explain the error precisely. (b) Now consider a different setting: a basketball player's shots are modeled as a Markov chain where P( Hit \mid previous Hit ) = 0.6 and P( Hit \mid previous Miss ) = 0.4. After three consecutive hits, what is the probability the next shot is a hit? (c) Miller and Sanjurjo (2018) showed that even with a fair coin, if you select flips that follow a streak of k Heads and compute the sample proportion of Heads among those selected flips, the expected proportion is strictly less than 1/2. Why does this happen, and what does it imply for empirical hot-hand studies?概率简单derivation未尝试免费088The St. Petersburg ParadoxA casino offers the following game. A fair coin is flipped repeatedly until the first Tails appears. If the first Tails occurs on flip n, you win 2 n dollars. (a) Compute the expected payoff of the game. (b) Despite the answer to (a), most people would pay no more than about \20 to play. Resolve this apparent paradox using Daniel Bernoulli's approach: assume the player has log utility u(x) = \ln(x) and initial wealth W. Compute the expected utility of the game and find the certainty equivalent (the sure amount that gives the same expected utility) for W = 1 , 000 , 000. (c) A more practical resolution: suppose the casino has finite total capital C. If the payout is capped at C = 2 40 (about \1 trillion), what is the expected payoff?概率中等derivation未尝试免费089The Prosecutor's FallacyA city has 1,000,000 residents. A crime is committed by one person. The police use a forensic test that has a false positive rate of 1 in 10,000 (i.e., P( positive \mid innocent ) = 10 -4 ) and a true positive rate of 100% (P( positive \mid guilty ) = 1). A suspect tests positive. (a) The prosecutor argues: 'The probability of a false positive is only 10 -4 , so there is only a 0.01% chance this person is innocent.' What is wrong with this argument? (b) Compute the actual probability the suspect is guilty given the positive test, assuming the suspect was selected uniformly at random from the city before the test. (c) Now suppose eyewitness evidence independently narrows the suspect pool to 5 people before the forensic test is applied. Recompute the posterior probability of guilt.概率中等数值题未尝试免费090Borel's Paradox: Conditioning on Measure-Zero EventsLet (\Theta, \Phi) be uniformly distributed on the unit sphere S 2, where \Theta \in [0, 2 ) is the longitude and \Phi \in [0, ] is the colatitude, with joint density f( , \phi) = 1 4 \sin \phi. (a) Compute the conditional distribution of \Phi given \Theta = 0 by treating \Theta as the conditioning variable (i.e., compute f(\phi \mid = 0)). (b) Now reparameterize: let X = \cos(\Theta) \sin(\Phi), Y = \sin(\Theta) \sin(\Phi), Z = \cos(\Phi). The great circle \ \Theta = 0\ can equivalently be described as \ Y = 0, X 0\ . Compute the conditional distribution of \Phi given Y = 0 and X > 0. Is it the same as in part (a)? (c) Explain why the two answers differ. What does this tell us about the meaning of 'conditioning on a measure-zero event,' and what is the correct mathematical framework for resolving this ambiguity?概率困难derivation未尝试免费091The False Positive Paradox (Base Rate Neglect)A rare disease affects 1 in 10,000 people. A screening test has 99% sensitivity (true positive rate) and 99% specificity (true negative rate). (a) A randomly chosen person tests positive. What is the probability they actually have the disease? (b) The same person takes a second independent test (same sensitivity and specificity) and tests positive again. Now what is the probability they have the disease? (c) A hospital administrator sees that the test is '99% accurate' and proposes mandatory screening of all 100,000 employees, arguing that 'almost everyone who tests positive will be sick.' Quantify how many of the expected positive results will be false positives, and explain why the administrator's reasoning is flawed.概率简单数值题未尝试免费097Bertrand's Paradox: The Random Chord ProblemConsider a circle of radius r with an inscribed equilateral triangle. A chord is drawn 'at random.' What is the probability that the chord is longer than the side of the triangle? Compute the answer under each of the following three methods of selecting a random chord: (a) **Random endpoints:** Fix one endpoint on the circle and choose the other endpoint uniformly on the circumference. (b) **Random midpoint:** Choose the midpoint of the chord uniformly in the disk. (c) **Random radius:** Choose a radius, then choose a point uniformly along that radius as the midpoint of the chord. For each method, set up and evaluate the relevant integral or geometric argument.概率简单derivation未尝试免费098The Will Rogers Paradox (Stage Migration)Group A consists of the values \ 1, 2, 3, 9\ and Group B consists of \ 5, 6, 7, 8\ . (a) Compute the mean of each group. (b) Now move the element 5 from Group B to Group A. Recompute the mean of each group. Verify that both means have increased. (c) The overall mean across all 8 values is unchanged. Prove the following general statement: if an element is moved from group B to group A, and the element's value x satisfies A < x < B (where A , B are the pre-move group means), then both post-move group means strictly exceed their pre-move values. (d) A medical study reports that a new diagnostic technology has improved average survival time in both Stage I and Stage II cancer patients, yet overall survival is unchanged. Explain how this is possible without any actual improvement in treatment.概率中等数值题未尝试免费