INTERVIEW PREP

数学与非代码面试题

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

题目
4169
领域
8
当前筛选
244

1 / 13

非代码面试题

显示 20 / 244 道匹配题目

答题状态:未尝试未正确已正确
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未尝试面试订阅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未尝试免费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未尝试免费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未尝试免费217Negative Binomial as a Poisson–Gamma MixtureLet \Lambda \sim Gamma (r, ) with density f \Lambda( ) = r \Gamma(r) r-1 e - for > 0, and let X \mid \Lambda = \sim Poisson ( ). (a) Write down P(X = k \mid \Lambda = ) and compute the marginal PMF P(X = k) by integrating over \Lambda. (b) Show that P(X = k) = \binom k + r - 1 k p k (1-p) r where p = 1 1+ , and identify the distribution. (c) Use the mixture representation to find E[X] and Var (X) via the tower property (law of total expectation and law of total variance), without computing the PMF. (d) Verify numerically: r = 3, = 4. Compute P(X = 2) and E[X].概率中等derivation未尝试免费226Mean and Variance of the Continuous Uniform DistributionLet X \sim Uniform (a, b). Starting from the PDF f(x) = 1 b-a for x \in [a, b], derive E[X] and Var (X).概率简单derivation未尝试免费227Memorylessness of the Exponential DistributionLet X \sim Exponential ( ). Prove that P(X > s + t \mid X > s) = P(X > t) for all s, t 0. Then show the exponential is the only continuous distribution with this property.概率简单derivation未尝试免费228Moment Generating Function of the Gamma DistributionLet X \sim Gamma ( , ) with PDF f(x) = \Gamma( ) x -1 e - x for x > 0. Derive the moment generating function M X(t) = E[e tX ] for t < . Then use M X(t) to compute E[X] and Var (X).概率中等derivation未尝试免费230Beta Distribution: Derivation, Moments, and ConnectionsConsider the Beta distribution with PDF f(x) = \Gamma( + ) \Gamma( )\Gamma( ) x -1 (1-x) -1 for x \in (0,1). (a) Verify that f integrates to 1 by showing \int 0 1 x -1 (1-x) -1 \,dx = \Gamma( )\Gamma( ) \Gamma( + ) using the integral representation of the Gamma function. (b) Derive E[X] = + and Var (X) = ( + ) 2( + +1) . (c) Show that Beta (1,1) reduces to Uniform (0,1). (d) If Y 1 \sim Gamma ( , 1) and Y 2 \sim Gamma ( , 1) are independent, explain (without full proof) why Y 1 Y 1+Y 2 \sim Beta ( , ).概率困难derivation未尝试免费231CDF and Tail Probability of the Exponential DistributionLet X \sim Exponential ( ) with PDF f(x) = e - x for x 0. (a) Derive the CDF F(x) = P(X x). (b) If = 1 2 , compute P(X > 3).概率简单数值题未尝试免费232Sum of Two Independent Exponentials via ConvolutionLet X 1, X 2 be independent, each distributed Exponential ( ). Using the convolution formula, derive the PDF of Y = X 1 + X 2 and identify the resulting distribution.概率中等derivation未尝试免费233Mean and Variance of the Lognormal DistributionLet X be a lognormal random variable, meaning \ln X \sim N( , 2). Using the moment generating function of the normal distribution, derive E[X] and Var (X).概率中等derivation未尝试免费235Chi-Squared Distribution from First PrinciplesLet Z 1, \ldots, Z n be i.i.d. N(0,1) random variables and define Q = \sum i=1 n Z i 2. (a) Derive the PDF of Z 1 2 using the change-of-variables technique for transformations of continuous random variables. (b) Show that Z 1 2 \sim Gamma ( 1 2 , 1 2 ) by matching the PDF from (a) to the Gamma family. (c) Using the fact that the sum of independent Gamma random variables with the same rate parameter is Gamma, state the distribution of Q. (d) Derive E[Q] and Var (Q).概率困难derivation未尝试免费237Mean and Variance of the Gamma Distribution via IntegrationLet X \sim Gamma ( , ) with PDF f(x) = \Gamma( ) x - 1 e - x for x > 0. (a) Derive E[X] by direct integration, using the fact that \int 0 \Gamma( ) x - 1 e - x \,dx = 1 for any > 0. (b) Derive E[X 2] similarly and compute Var (X).概率简单derivation未尝试免费238Non-Existence of the Mean for the Cauchy DistributionThe standard Cauchy distribution has PDF f(x) = 1 (1 + x 2) for x \in (- , ). (a) Show that E[|X|] does not exist by proving the integral \int 0 x (1+x 2) \,dx diverges. (b) What does this imply about the applicability of the Law of Large Numbers to the sample mean X n = 1 n \sum i=1 n X i when X i are i.i.d. Cauchy?概率中等derivation未尝试免费239Ratio of Independent Standard Normals is CauchyLet Z 1, Z 2 be independent N(0,1) random variables. Define R = Z 1 / Z 2. (a) Write the joint PDF of (Z 1, Z 2) and use the transformation (Z 1, Z 2) \mapsto (R, Z 2) = (Z 1/Z 2,\, Z 2) to derive the joint PDF of (R, Z 2). (b) Integrate out Z 2 to obtain the marginal PDF of R. (c) Identify the distribution of R.概率困难derivation未尝试免费240Beta Distribution and the Beta Function from Independent GammasLet X \sim Gamma ( , 1) and Y \sim Gamma ( , 1) be independent. (a) Define U = X X+Y and V = X + Y. Compute the Jacobian of the transformation (X, Y) \mapsto (U, V). (b) Derive the joint PDF of (U, V) and show that U and V are independent. (c) Identify the marginal distribution of U and prove that B( , ) = \Gamma( )\,\Gamma( ) \Gamma( + ) , where B( , ) = \int 0 1 u -1 (1-u) -1 \,du.概率困难derivation未尝试免费241Tail Probability and Conditional Expectation of the Pareto DistributionThe Pareto distribution with shape > 0 and scale x m > 0 has PDF f(x) = \, x m x +1 , \quad x x m. (a) Derive P(X > t) for t x m. (b) Derive E[X \mid X > t] for > 1 and t x m. (c) Compute both quantities for = 3, x m = 1, t = 2.概率简单数值题未尝试免费242Distribution of the Sum of Two Independent UniformsLet X and Y be independent Uniform (0, 1) random variables. Define S = X + Y. (a) Using the convolution formula f S(s) = \int - f X(t)\, f Y(s - t)\, dt, derive the PDF of S for all s \in R . (b) Sketch the PDF and identify the distribution by name. (c) Compute P(S > 1.5).概率中等derivation未尝试免费243Inverse Transform Sampling for the Exponential DistributionLet U \sim Uniform (0, 1). (a) For a continuous random variable X with strictly increasing CDF F, prove that F(X) \sim Uniform (0,1). (b) Use part (a) to argue that X = F -1 (U) has CDF F. (c) For X \sim Exp ( ) with CDF F(x) = 1 - e - x (x 0), derive F -1 explicitly and write a one-line formula for generating exponential samples from uniform samples.概率中等derivation未尝试免费