INTERVIEW PREP

数学与非代码面试题

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

题目
4169
领域
8
当前筛选
1751

2 / 88

非代码面试题

显示 20 / 1751 道匹配题目

答题状态:未尝试未正确已正确
200Full Distribution of Empty Urns via Stirling NumbersSix distinguishable balls are thrown independently and uniformly at random into 5 distinguishable urns. Let E denote the number of empty urns. Derive the probability mass function P(E = k) for every possible value of k, expressing each probability as an exact fraction.概率困难derivation未尝试免费213Conditional Distribution of a Binomial Sum ComponentLet X \sim Binomial (m, p) and Y \sim Binomial (n, p) be independent. (a) What is the distribution of S = X + Y? State and justify. (b) Derive the conditional PMF P(X = k \mid S = s) for valid k. (c) Identify this conditional distribution by name and parameters. Interpret the result: why does p disappear from the conditional distribution? (d) Verify with a numerical example: m = 10, n = 15, p = 0.4. Compute P(X = 3 \mid S = 8).概率中等derivation未尝试免费214Poisson Thinning and Independence of Split StreamsLet N \sim Poisson ( ). Each of the N events is independently classified as type 1 with probability p and type 2 with probability 1 - p. Let N 1 and N 2 denote the counts of type 1 and type 2 events, respectively. (a) Derive the marginal distribution of N 1. (b) Derive the joint PMF P(N 1 = j, N 2 = k) and show that N 1 and N 2 are independent. (c) A website receives page views at rate = 200 per hour. Each visitor independently converts (makes a purchase) with probability p = 0.03. Find the probability of exactly 4 conversions in an hour, and the probability of at least 1 conversion given at most 210 total page views.概率困难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未尝试免费218Coupon Collector's Problem via Geometric Waiting TimesA cereal box contains one of n distinct coupon types, each equally likely. You buy boxes one at a time, independently. Let T be the number of boxes needed to collect all n types. (a) Define T i as the number of additional boxes needed to go from i-1 distinct types to i distinct types. What is the distribution of T i? State its parameter. (b) Express T in terms of T 1, T 2, \ldots, T n and use linearity of expectation to derive E[T]. (c) Show that E[T] = n H n where H n = \sum k=1 n 1/k is the n-th harmonic number. (d) Compute E[T] for n = 10. How many boxes on average? (e) Derive Var (T) using the independence of T 1, \ldots, T n.概率中等derivation未尝试免费287Robust Same-Rank Pairs in a Poker HandYou are dealt a 5-card hand uniformly at random from a standard 52-card deck. A same-rank pair is an unordered pair of cards in your hand that share the same rank (e.g., two Kings). Find the expected number of same-rank pairs in your hand. Additional robustness twist: before observation, an independent random relabeling of outcome labels is applied. Compute the same target and justify invariance.概率简单数值题未尝试免费295Robust Cycles in a Random PermutationLet be a uniformly random permutation of \ 1, 2, \dots, n\ . Find the expected number of cycles in the cycle decomposition of . Express your answer as a familiar function of n. Additional robustness twist: before observation, an independent random relabeling of outcome labels is applied. Compute the same target and justify invariance.概率困难derivation未尝试免费296Robust Heads-Tails Transitions in Coin FlipsYou flip a fair coin n times independently. A transition at position i (for 1 \le i \le n-1) occurs when flip i and flip i+1 differ (one is heads and the other tails). Find the expected number of transitions. Additional robustness twist: before observation, an independent random relabeling of outcome labels is applied. Compute the same target and justify invariance.概率简单derivation未尝试免费297Robust Distinct Birthdays in a GroupA group of n people each have a birthday chosen independently and uniformly at random from 365 days. A day is represented if at least one person in the group has that birthday. Find the expected number of represented days. Additional robustness twist: before observation, an independent random relabeling of outcome labels is applied. Compute the same target and justify invariance.概率简单derivation未尝试免费301Robust Descents in a Random PermutationLet be a permutation of \ 1, 2, \dots, n\ chosen uniformly at random. A descent is a position i \in \ 1, \dots, n-1\ where (i) > (i+1). What is the expected number of descents? Additional robustness twist: before observation, an independent random relabeling of outcome labels is applied. Compute the same target and justify invariance.概率简单数值题未尝试免费303Robust Coincident RollsYou roll a fair k-sided die n times independently. Let M be the number of pairs (i, j) with 1 \le i < j \le n such that roll i equals roll j. Find E[M]. Additional robustness twist: before observation, an independent random relabeling of outcome labels is applied. Compute the same target and justify invariance.概率中等derivation未尝试免费305Robust Unique Choices and Unique NeighborsThere are n people in a line, and each independently and uniformly picks an integer from \ 1, 2, \dots, k\ . A person is called unique if no other person picked the same number. (a) Using indicator variables, find E[U], the expected number of unique people. (b) A unique neighbor pair is a pair of adjacent people (i, i+1) who are both unique. Find E[N], the expected number of unique neighbor pairs. Additional robustness twist: before observation, an independent random relabeling of outcome labels is applied. Compute the same target and justify invariance.概率困难derivation未尝试免费306Robust Intermediate Positions in a PermutationLet be a uniformly random permutation of \ 1, 2, \dots, n\ . Call position i \in \ 2, \dots, n-1\ an intermediate position if (i) is strictly between (i-1) and (i+1), i.e., \min( (i-1), (i+1)) < (i) < \max( (i-1), (i+1)). What is the expected number of intermediate positions? Additional robustness twist: before observation, an independent random relabeling of outcome labels is applied. Compute the same target and justify invariance.概率简单数值题未尝试免费322Robust Adjacent Matches in Dice RollsRoll a fair six-sided die n times independently, producing a sequence D 1, D 2, \dots, D n. An adjacent match occurs at position i (for 1 \le i \le n - 1) if D i = D i+1 . Find the expected number of adjacent matches. Additional robustness twist: before observation, an independent random relabeling of outcome labels is applied. Compute the same target and justify invariance.概率简单数值题未尝试免费324Robust Monochromatic Edges in a Random ColoringEach vertex of the complete graph K n is independently colored red or blue, each with probability \tfrac 1 2 . An edge is monochromatic if both its endpoints have the same color. Find the expected number of monochromatic edges. Additional robustness twist: before observation, an independent random relabeling of outcome labels is applied. Compute the same target and justify invariance.概率中等数值题未尝试免费334Robust Covariance of Overlapping Sums of Independent VariablesLet X, Y, Z be independent random variables with Var (X) = 1, Var (Y) = 2, and Var (Z) = 3. Define U = X + Y and V = Y + Z. Compute Cov (U, V) and Corr (U, V). Additional robustness twist: before observation, an independent random relabeling of outcome labels is applied. Compute the same target and justify invariance.概率中等数值题未尝试免费335Robust Variance of the Sample Mean Under Sampling Without ReplacementAn urn contains N balls numbered 1, 2, \dots, N. You draw n balls without replacement and let X = \tfrac 1 n \sum i=1 n X i, where X i is the number on the i-th draw. Derive Var ( X ) in terms of N and n, and evaluate it for N = 10, n = 4. Additional robustness twist: before observation, an independent random relabeling of outcome labels is applied. Compute the same target and justify invariance.概率困难derivation未尝试免费339Robust Conditional Variance in the Bivariate NormalLet (X, Y) follow a bivariate normal distribution with E[X] = 0, E[Y] = 0, Var (X) = 1, Var (Y) = \sigma Y 2, and Corr (X,Y) = . Derive Var (Y \mid X = x) and show that it does not depend on x. Evaluate numerically for \sigma Y = 3 and = 0.6. Additional robustness twist: before observation, an independent random relabeling of outcome labels is applied. Compute the same target and justify invariance.概率困难derivation未尝试免费344Robust Approximate Variance of a Ratio via the Delta MethodLet X and Y be independent random variables with E[X] = 10, Var (X) = 4, E[Y] = 5, and Var (Y) = 1. Using the delta method (first-order Taylor expansion), derive an approximation for Var (X/Y) and evaluate it numerically. Additional robustness twist: before observation, an independent random relabeling of outcome labels is applied. Compute the same target and justify invariance.概率困难derivation未尝试免费349Robust Variance of a Random Sum (Wald's Variance Identity)A shop receives N customer orders per day, where N \sim Poisson (8). Each order has an independent random dollar amount X i with E[X i] = 50 and Var (X i) = 400. Let S = X 1 + X 2 + \cdots + X N be the total daily revenue. Using the law of total variance, derive a formula for Var (S) and evaluate it. Additional robustness twist: before observation, an independent random relabeling of outcome labels is applied. Compute the same target and justify invariance.概率中等数值题未尝试免费