INTERVIEW PREP

数学与非代码面试题

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

题目
4169
领域
8
当前筛选
40

1 / 2

非代码面试题

显示 20 / 40 道匹配题目

答题状态:未尝试未正确已正确
152Expected Draws Until First Birthday MatchPeople enter a room one at a time, each with a birthday drawn independently and uniformly from 365 days. Let T be the number of people present when a birthday collision first occurs (i.e., the newcomer shares a birthday with someone already in the room). Write a closed-form expression for E[T] as a finite sum involving factorials and powers of 365, then approximate it numerically.概率简单数值题未尝试免费154Expected Number of Birthday-Collision PairsIn a group of n people whose birthdays are independent and uniform on \ 1,\ldots,365\ , let X be the number of unordered pairs (i,j) with i < j who share a birthday. Using indicator random variables, find E[X]. Then determine the smallest n for which E[X] \ge 1.概率中等derivation未尝试免费155Variance of Birthday-Collision Pair CountContinuing from the setup of the expected collision-pair count: n people have independent uniform birthdays on \ 1,\ldots,d\ . Define X = \sum i<j 1 [B i = B j]. (a) Compute Var (X). (b) A surprising intermediate step: show that Cov ( 1 [B i = B j],\, 1 [B j = B k]) = 0 for distinct i,j,k even though the two indicators share the index j. Explain intuitively why this zero covariance holds. (c) For d = 365 and n = 28, compute Var (X) numerically and give the coefficient of variation \sigma X / E[X].概率困难derivation未尝试面试订阅159Near-Birthday Problem: Birthdays Within One DayFourteen people have birthdays chosen independently and uniformly on a circular calendar of 365 days (day 1 is adjacent to day 365). Two people have a **near-match** if their birthdays differ by at most 1 day (i.e., they land on the same day or on consecutive days). Let M be the number of unordered near-match pairs. (a) Compute E[M]. (b) Using a Poisson approximation for the probability that M \ge 1, estimate P( at least one near-match ). (c) Contrast with the standard birthday problem: for n = 14 people, what is P( at least one exact match )?概率中等数值题未尝试免费160Expected and Variance of Distinct Birthday CountAmong n people whose birthdays are independent and uniform on \ 1, \ldots, d\ , let D be the number of distinct birthdays observed. (a) Derive E[D] using indicator random variables. (b) Derive Var (D). You will need P( day j and day k both occupied ) for j \ne k. (c) For n = 100 and d = 365, compute E[D], Var (D), and the expected number of "collision people" n - D (people whose birthday coincides with at least one other person). (d) Is E[n - D] the same as the expected number of collision pairs \binom n 2 /d from the indicator-pair approach? Explain the distinction.概率困难derivation未尝试面试订阅180Hypergeometric Moments from an UrnAn urn contains 20 balls: 8 red and 12 blue. You draw 5 balls without replacement. Let X be the number of red balls drawn. Derive E[X] and Var (X) using indicator random variables. Express each answer as an exact fraction.概率困难derivation未尝试免费181Coupon Collector with Four TypesA cereal box contains one of 4 equally likely coupon types. You buy boxes one at a time. What is the expected number of boxes you must buy to collect all 4 types?概率简单数值题未尝试免费185Coupon Collector: Mean and VarianceA machine dispenses one of n = 4 equally likely prize types per trial. Let T be the number of trials needed to collect all 4 types. Derive both E[T] and Var (T) by decomposing T into independent geometric phases. Express each answer as an exact fraction.概率困难derivation未尝试免费195Expected Time to First Collision in Six UrnsBalls are thrown one at a time, each landing independently and uniformly at random into one of 6 urns. Let T be the index of the first ball that lands in an already-occupied urn (so T \ge 2). Derive E[T] and give an exact fraction.概率困难derivation未尝试免费204Negative Binomial Variance from Geometric SummationLet X be the number of independent Bernoulli(p) trials needed to accumulate r successes. Express X as a sum of independent geometric random variables and use this to find Var (X).概率中等derivation未尝试免费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未尝试免费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未尝试免费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未尝试免费286Robust Ascents in a Random PermutationLet be a uniformly random permutation of \ 1, 2, \dots, n\ . An ascent at position i (for 1 \le i \le n-1) is a position where (i) < (i+1). Find the expected number of ascents. 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未尝试免费