Você está na página 1de 15

A Collection of Interview Questions in Statistics and Probability

http://www.spellscroll.com February 27, 2013

Contents
1 Probability Interview Questions 1.1 Coin Tossing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Conditional Probability Problems . . . . . . . . . . . . . . . . 1.3 Misc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bibliography 7 7 9 9 15

CONTENTS

Disclaimer
All the questions (and solutions) presented in this document were originally collected by the spellscroll.com team from various sources including books, mailing-lists and online forums, etc. The spellscroll.com team spent significant amount of time in selecting, editing and formatting these questions (and solutions), in the hope that our eorts will be of help to people who are preparing technical interviews. Any comments, suggestions and corrections are welcome. This document is free to be downloaded, copied and distributed so long as this disclaimer is clearly reproduced at its beginning. However, we are NOT responsible for the possible mistakes contained in this document or any improper use of this document.

CONTENTS

Chapter 1 Probability Interview Questions


1.1 Coin Tossing

1. Generate even odds from an unfair coin. If you have an unfair coin, which may bias toward either heads or tails at an unknown probability, can you generate even odds using this coin? 2. Two people take turns to ip a coin, Your opponent starts rst, you second. The game ends when there is a tail followed by a head. The guy who has the head wins. Whats the probability that you win the game. 3. Two gamblers, A and B, are playing a coin toss game. A tossed N+1 times, B tossed N times, whats the probability that A gets more heads than B? 4. Two people each tosses a fair coin N times. Find the probability that they get the same number of heads. 5. A and B toss a fair coin, let X be the number of tosses when A get 2 consecutive heads, Y be the number of tosses when B get 3 consecutive heads, nd the probability that X is more than Y. 6. Whats the expected number of tosses needed to get a rst consecutive 2 heads? same question for getting THHTHT. 7. A fair coin is tossed repeatedly until k consecutive heads occur. What is the expected number of times the coin is tossed?

1.1. COIN TOSSING

8. You toss a coin whose probability of heads is p. You stop tossing when there are two consecutive heads. What is the probability of stopping at Nth toss and whats the expected number of total tosses. 9. You ip a fair coin until you get the same face twice in a row. What is the probability that you stop on an even number of tosses? 10. A fair coin is tossed n times independently. Whats the probability of having at least k consecutive heads? 11. Toss a coin until the nth Head turns up. Let Y=number of required tosses, calculate P(Y is even), set p=P(H),q=P(T). 12. Two people toss a dice with n faces in an alternative manner, the game is over when a face shows up with point lower than the previous toss and that person loses the game. (a) What is the probability of the rst person losing the game. (b) Whats the expected number of tosses and whats the expected maximum point. 13. Toss a fair coin until we get a 5H in a row or 2T in a row. Whats the probability of getting 5H in a row at the end of the game prior to 2T in a row? 14. Estimate the probability of exactly 50 heads in 100 tosses of a coin. What is the probability of exactly 55 heads? Estimate the probability that the number of heads lies between 40 and 60. Whats the probability at least 60 of them are heads? 15. N coins on the oor, every time you randomly pick one, if it is head, ip it to tail; if it is tail, toss it. after many many times, what is the ratio btw head vs. tail coins on the oor? (Hint: Markov Chain. Ans: 1/3 vs 2/3) 16. Flip a coin until either HHT or HTT appears. Is one more likely to appear rst? If so, which one and with what probability? 17. The median of waiting time. Let r be a xed positive integer, and let W be the waiting time until the r-th head in a sequence of fair coin tosses. Find a simple formula in terms of r for the median of W, that is, the least integer w so that P (W > w) 1/2. 18. Two people ip coins independently. The probability of getting a head is p. A ips rst. What is the probability that A gets two consecutive heads earlier than B?

http://www.spellscroll.com

1.2

Conditional Probability Problems

1. Suppose each of two balls in an urn can be either red, black or green with probability 1/3. You choose a ball at random from the urn, note that it is green, replace the ball, and then choose once again at random. What is the probability that the second ball chosen is red? 2. 9 fair coins and 1 special with double head. First I draw a coin and see the face is a head, what is the conditional probability that the next one is the special one? (1/11) 3. If the probability of seeing a shooting star over the course of an hour is 0.64, what is the probability of seeing a shooting star over the course of a half hour. (0.4) 4. You have .25 chance to forget an umbrella in a store. You found you forgot an umbrella after visiting two stores. How much is the chance you forgot it in the rst. (4/7) 5. Three pieces of pizzas, 1 with both sides burned, 1 with 1 side burned, 1 with 0 side burned. Stack them together blindly, you see the top surface is burned, what is the probability for the other side of the top pizza being burned? (2/3) 6. You are playing Russian roulette with a six chamber revolver, you load 2 bullets into the revolver in adjacent chambers. You spin the barrel place the gun to your head and pull the trigger, you dont shoot yourself. You now have the option of either spinning the barrel or pulling the trigger again, which do you take? (1/4 vs 1/3) 7. Monty Hall show

1.3

Misc

1. [Order Statistics; Correlation] Let X and Y be two i.i.d uniform random variables drawn from (0,1). Let A be min(X,Y) and B be max(X,Y), whats the correlation between A and B? 2. If X,Y, Z are 3 random variables such that X and Y are 90% correlated, Y and Z are 80% correlated, what is the minimum correlation that X and Z could have?

10

1.3. MISC

3. [Poker] Calculate probabilities of royal ush, full house, ush, straight, three of kind, two pairs, one pair, no hand. 4. [Election Problem] Two candidates (R and L) are for the 2008 election. In the election, voters are in a single line and are going to vote one by one. After each voter makes the vote, the other voters immediately knows who he/she voted for. Voters tend to stay with the winners side, if at the moment the candidates have x and y votes respectively, the voter will vote R with probability x/(x + y), and vote L with probability y/(x + y). Suppose R and L initially have x0 and y0 votes each (x0 and y0 are far smaller than the total number of voters), and let P be the nal percentage of votes R receives. Question: what is E(P )? what is the distribution of random variable P ? 5. A man has n keys of which one will open his lock and the others will not. If he tries the key randomly one at a time, what is the probability that the lock will be opened on the rth try where 1 r n? 6. Suppose n distinguishable balls are randomly distributed into r boxes. If Sr is the number of empty boxes, Sr = X1 + . . . + Xr where Xi is 1 or 0 according to whether box i is empty or not, 1 i r. Calculate E[Xi ]. Calculate E[Xi Xj ], i = j. Calculate E[Sr ] and V ar[Sr ]. 7. My telephone rings 12 times each week, the calls being randomly distributed among the 7 days. What is the probability that I get at least one call each day? 8. Randomly draw m numbers from 1, 2, . . . , n without replacement. Let S be the sum of these m numbers. Compute E(S) and V ar(S). 9. Let U be a continuous uniform [0,1] random variable. What is the probability that the decimal expansion of U contains no ves? 10. What is the expected number of random numbers, uniformly distributed from 0 to 1 needed to the sum to be greater than 1?

http://www.spellscroll.com

11

11. Given two i.i.d uniform random points x and y on the interval [0,1] , what is the average size of the smallest of the three resulting intervals? 12. X is normally distributed N(0,1). What is the distribution density function of Y = X 2 . 13. Let X be a normal random variable N (, ) and a be a real number. Compute E[minX, a]. 14. Two random normal variables X N (0, 1 ), Y N (0, 2 ), U = X + Y , Compute E(X|U ) and E(Y |U ). 15. A bag contains a total of N balls with either blue or red color. If ve balls are randomly chosen from the bag, the probability is precisely 1/2 that all ve balls are blue. Whats the smallest value of N for which this is possible? (Hint: Use dierent number of blue/red balls to get to the answer?) 16. There are two neighbors, one of them are having 2 boys and 1 girl while the other is having 2 boys and 2 girls. Now we wish pick two children of same gender, then which family should we pick to maximize our chances ? (same) 17. Absent-minded Passengers A fully-booked plane is about to be boarded by its hundred passengers. The rst passenger loses his boarding card and sits down in a random place. From then on, a passenger, whenever nding his seat taken, very politely sits somewhere at random. (1) What is the probability that the hundredth passenger sits in his own seat? (1/2) (2) What is the probability that the k-th passenger sits in his own seat? 18. An airplane has n seats, and all of them have been sold for a particular ight, with no overbooking. When the last passenger arrives, he nds that his seat is taken. When he shows his reservation to the passenger at his seat, that passenger stands up, and goes to her own assigned seat. If that seat is empty, she seats down, and the seating procedure is over. If not, she shows her reservation to the person seating at that seat. That person stands up, and goes to his assigned seat, and so on. This procedure continues until someone nds his or her assigned seat empty. Tom was not the last passenger to board the plane. What is the probability that he has to move during this procedure.

12

1.3. MISC

19. There are 20 oors in a building. I step into the elevator with 5 other people. What is the probability that I do not have to press my button? (i.e. someone else chooses the same oor as me) (ans: (1 (18/19)5 )) 20. There are 3 ants at 3 corners of a triangle, they randomly start moving towards another corner. What is the probability that they dont collide. (1/4) 21. There are 4 ants on a square, one at each corner. At the same time, they all set o for a dierent corner at random. What is the probability that they dont collide? 22. Spaghetti noodles You have a bowl of k spaghetti noodles, presumably cooked and exible. A trial consists of randomly choosing an end of a noodle for each hand, then gluing them together. Suppose you do k trials (same as number of noodles). What is the expected number of closed circuits? 23. Urn model: sampling without replacement We start with an urn containing n white balls and m black balls. The evolution of the urn occurs in discrete time steps. At every step a ball is chosen at random from the urn. The color of the ball is inspected and then the ball is discarded. Whats the probability of getting a white ball in the k-th step? 24. An urn contains ve balls, one marked WIN and four marked LOSE. You and another player take turns selecting a ball from the urn, one at a time. The rst person to select the WIN ball is the winner. If you draw rst, nd the probability that you will win if the sampling is done. (a) with replacement. (answer = 5/9); (b) without replacement. (answer = 3/5) 25. A point P is chosen at random inside an equilateral triangle. What is the probability that the perpendiculars to the sides of the triangle from P can be arranged to form a triangle? 26. Probability of 3 uniform r.v. in [0,1] forming a triangle. 27. There are 2 Random samples from [0, 1] uniform distribution. What is the average distance between them. 28. A string, cut it into three parts, what is the probability you can make a triangle out of the three pieces? If you instead make the second cut on

http://www.spellscroll.com

13

the longest piece, what is then the probability you can make a triangle out of the pieces? 29. The little end of stick If a stick is broken in two at random, what is the average length of the smaller piece? What is the average ratio the smaller length to the larger. 30. The Broken Bar A bar is broken at random in two places. Find the average of the smallest,of the middle-sized, and of the largest pieces. Generalize to n pieces. 31. Choose n points at random on the surface of the unit sphere in Rd . Whats the probability that all points lie on some hemisphere. 32. Random Intervals Whats the probability that one of n=2 random intervals in [0,1] meets every other interval? 33. Let d(A, B) denote the Euclidean distance between two points A and B. In the Euclidean plane there are given a circle and a square that are disjoint but have equal areas. Two points C1 and C2 are randomly chosen in the circle, and two points S1 and S2 are randomly chosen in the square. Find the probability that d(C1, C2) > d(S1, S2). 34. Suppose you are at a bus stop, waiting for either bus No. 1 or bus No. 2. In other words, either of the buses can take you to your destination. Furthermore assume that bus No. 1 comes every 12 minutes, and bus No. 2 comes every 30 minutes. If you come to the bus stop at random time, what is your expected waiting time for either of the buses? (ans: 5.2m)

14

1.3. MISC

Bibliography
[Bol06] B. Bollobas. The Art of Mathematics, Coee Time in Memphis. Cambridge University Press, 2006. Buy at Amazon.com: http://www. amazon.com/dp/0521693950/?tag=spellscrollco-20. [Cas95] G. Casella and R. L. Berger. Statistical Inference. Springer, 1995. Buy at Amazon.com: http://www.amazon.com/dp/0534243126/ ?tag=spellscrollco-20. [Isa95] R. Isaac. The Pleasures of Probability. Springer, 1995. http://www.amazon.com/dp/038794415X/?tag= spellscrollco-20.
Buy at Amazon.com:

[Mos87] F. Mosteller. Fifty Challenging Problems in Probability with Solutions. Dover Publications, 1987. Buy at Amazon.com: http://www. amazon.com/dp/0486653552/?tag=spellscrollco-20. [Zho08] X. Zhou. A Practical Guide To Quantitative Finance Interviews. CreateSpace Independent Publishing Platform, 2008. Buy at Amazon.com: http://www.amazon.com/dp/1438236662/?tag= spellscrollco-20.

Você também pode gostar