INTERVIEW PREP

数学与非代码面试题

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

题目
4169
领域
8
当前筛选
81

3 / 5

非代码面试题

显示 20 / 81 道匹配题目

答题状态:未尝试未正确已正确
205Hypergeometric Mean and Variance via Indicator VariablesAn urn contains 20 balls: 8 red and 12 blue. You draw 5 balls without replacement. Let X be the number of red balls drawn. Define indicator variables X i = 1 \ ball i is red \ for each draw i = 1, \ldots, 5. (a) Use linearity of expectation to find E[X]. (b) Compute Cov (X i, X j) for i \ne j and use it to derive Var (X). (c) Verify that your variance formula reduces to the binomial variance np(1-p) when N with K/N p held fixed.概率困难derivation未尝试免费210Multinomial Covariance and Conditional DistributionA fair die is rolled n = 60 times. Let X i be the number of times face i appears, for i = 1, \ldots, 6, so (X 1, \ldots, X 6) \sim Multinomial (60,\, 1/6, \ldots, 1/6). (a) Using indicator variables, compute Cov (X 1, X 2). (b) Find the correlation (X 1, X 2). (c) Determine the conditional distribution of (X 2, X 3, X 4, X 5, X 6) given X 1 = 12. What is E[X 2 \mid X 1 = 12]?概率困难derivation未尝试免费219Distribution of the Maximum of Independent Geometric Random VariablesLet X 1, X 2, \ldots, X n be independent Geometric (p) random variables with P(X i = k) = (1-p) k-1 p for k = 1, 2, \ldots Define M = \max(X 1, \ldots, X n). (a) Show that P(M \le m) = [1 - (1-p) m] n for m = 1, 2, \ldots (b) Derive P(M = m) from the CDF. (c) Express E[M] as an infinite series using the tail-sum formula E[M] = \sum m=0 P(M > m). Simplify to: E[M] = \sum m=0 [1 - (1 - (1-p) m) n ]. (d) For the special case n = 2, p = 1/2, compute P(M = 1), P(M = 2), P(M = 3) and verify they sum to nearly 1. Compute E[M] exactly by evaluating the series. (e) For general n and small p, argue heuristically that E[M] \approx \ln n p by comparing to the continuous exponential analogue.概率困难derivation未尝试免费225Minimum of Independent Geometric Random VariablesLet X 1, X 2, \ldots, X n be independent, each X i \sim Geometric (p i) with P(X i = k) = (1-p i) k-1 p i for k = 1, 2, \ldots (the "number of trials until first success" convention). Define M = \min(X 1, \ldots, X n). (a) Show that P(M > k) = \prod i=1 n (1-p i) k for k = 0, 1, 2, \ldots (b) Prove that M \sim Geometric \! (1 - \prod i=1 n (1-p i) ). State the PMF of M explicitly. (c) For the iid case p i = p for all i: express E[M] and Var (M) in terms of n and p, and verify that E[M] 1 as n . (d) **Application:** Five independent traders each attempt to fill an order on any given day with probability 0.3. What is the expected number of days until the first fill occurs? What is the probability that no fill occurs in the first 3 days? (e) Show that P(X j = M \mid M = m) depends on j (when p i are not all equal) and compute this probability for n = 2, p 1 = 0.3, p 2 = 0.5, m = 2.概率困难derivation未尝试免费285Robust Monochromatic Cliques in a Random Edge-ColoringEach edge of the complete graph K n is independently colored red or blue with equal probability 1 2 . For a fixed integer k \ge 2, find the expected number of monochromatic k-cliques (complete subgraphs on k vertices whose edges are all the same color). Express your answer in terms of n and k. Additional robustness twist: before observation, an independent random relabeling of outcome labels is applied. Compute the same target and justify invariance.概率困难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.概率简单数值题未尝试免费288Robust Isolated Vertices in a Random GraphIn the Erdos-Renyi random graph model G(n,p), each of the \binom n 2 possible edges among n labeled vertices is included independently with probability p. A vertex is isolated if it has no edges. Find the expected number of isolated vertices. Additional robustness twist: before observation, an independent random relabeling of outcome labels is applied. Compute the same target and justify invariance.概率中等derivation未尝试免费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未尝试免费300Robust Common Edges of Two Random Spanning TreesLet T 1 and T 2 be two independent uniformly random spanning trees of the complete graph K n (each drawn uniformly at random from all n n-2 labeled spanning trees, independently of the other). Find the expected number of edges that belong to both T 1 and T 2. 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.概率简单数值题未尝试免费302Robust Matching Colors in a LineThere are n people standing in a line. Each person independently and uniformly picks one of three colors: red, green, or blue. What is the expected number of adjacent pairs (i, i+1) who chose the same color? 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.概率简单数值题未尝试免费315Robust Singleton Coupons After Random DrawsA collector draws m coupons independently and uniformly at random from n types. A coupon type is called a singleton if it appears exactly once among the m draws. Find the expected number of singleton types. Additional robustness twist: before observation, an independent random relabeling of outcome labels is applied. Compute the same target and justify invariance.概率困难derivation未尝试免费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.概率简单数值题未尝试免费323Robust Overlap of Two Random SubsetsLet S and T be two subsets of \ 1, 2, \dots, n\ , each chosen independently and uniformly at random from all \binom n k subsets of size k (where 1 \le k \le n). Find the expected size of their intersection |S \cap T|. Additional robustness twist: before observation, an independent random relabeling of outcome labels is applied. Compute the same target and justify invariance.概率中等derivation未尝试免费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.概率中等数值题未尝试免费