Trader Interview Questions in London, UK | Glassdoor.co.uk

# Trader Interview Questions in London

197

Trader interview questions shared by candidates

## Top Interview Questions

Sort: RelevancePopular Date

27 Apr 2011

29 Dec 2012
 We consider numbers from 1 to 1 million. How many digits 2 are there??10 Answers600 000940951654321: The total number of digits 1-999,999 is 5888889 Total 1-9 = 9 10-99 = 2*9*10 and so on so number of 2s is 5888889/9Show more responses654321: The total number of digits 1-999,999 is 5888889 Total 1-9 = 9 10-99 = 2*9*10 and so on so number of 2s is 5888889/9Each time you fix a digit 2 (in units, tens...), then you change the other 5 digits. So you'll have 100 000 number. Having that for the six placements, the result would be 600 000.600,000 6C6 with 6 digits, 9(6C5) with 5, (9^2)(6C4) with 4...etc. Add them up 600,000.11111110^6-9^6observe the recurrence relation. 1-9 there is 1 from 1-99 there is 10 1-9 intervals plus 10 digits from 2x. and then it continuous in exactly the same fashion add one 0 you get 10 times as many plus 10^(n-1) from the nth digit you add. (((((10+10)*10+100)*10+1,000)*10+10,000)*10+100,000)=600,000Consider from 0000000 to 9999999, the number of 0,1,2,3,4,5,6,7,8,9 present must be the same since they are all symmetric. prove: the position can be filled with 0 can be filled with 1, so the number of 0=the number of 1; the number of 1=the number of 2 for the same reason. ... so the number of 0-9 are all the same. There are 6*1million positions in total, thus 6 million positions, divided by 10, is 600,000.

2 Jan 2011
 You roll two die: What is the probability of rolling a 10 and an 11 before rolling a 7?8 Answers17/132How did you get that?Individually 10 comes up 3/11 (4+6, 5+5, 6+4), 11 comes up 2/11, 7 comes up 6/11. Consider 10 first: Then only interested in 7,11: Probability 11 is 2/8, 7 is 6/8. Consider 11 first: Then only interested in 7,10: Probability 10 is 3/9, 7 is 6/9. Consider 7 first: Busted. So add 10 then 11, and 11 then 10: (3/11)*(2/8)+(2/11)*(3/99)=17/132.Show more responses5/11 let's say d is the probability that 10 or 11 comes up before 7. probability of rolling 10: (6+4,4+6,5+5) = 3/36 probability of rolling 11: (6+5,5+6): 2/36 probability of rolling 7: (6+1,1+6,5+2,2+5,4+3,3+4): 6/36 d = you roll 10 or you roll 11 or (you roll something other than 10,11,7 and roll 10 or 11 before 7) d = (3/36) + (2/36) + (25/36)*d (11/36)*d = (5/36) d= 5/11Anonbyfar is correct, 5/11 is the right answer but for the wrong questiondoesnt the answer by 'Anonbyfar' (17/132) give you the probability of rolling a 10 and 11 within two rolls? Shouldnt this be then related to the probability of rolling a 7 (6/11). I.e 17/72?P(10 or 11 before 7) = P(10 or 11 | 10 or 11 or 7) = [P(10) + P(11)]/[P(10)+P(11)+P(7)] P(10) = 3/36 4,6 5,5 6,4 P(11)= 2/36 5,6 6,5 P(7) = 6/36 1,6 2,5, 3,4 4,3 5,2 6,1 Answer: 5/11roll 10 or 11: 5 cases roll 7: 6 cases roll others: 25 in total: 36 cases So Pr = 5/36 + 25/36 *Pr Pr = 5/11

6 Oct 2013
 If I write down all of the numbers from 1 to 1,000,000 on a page, how many times do I write down the digit 2?9 Answers(base 10 )log(x)/10*xI got 468599600000 (verified through brute force)Show more responsesimagine the numbers written as 000001 000002 000003.....999998 999999, then we 1 million numbers containing 6 digits, each digit of 10 digits we have, is used as much as any other number. Therefore, you write down the digit 2 10% * 6 million - 600,000the minus must be an equal sign on the end, so 600,000 is the right number[1 x 10 x 10 x 10 x 10 x 10] + [10 x 1 x 10 x 10 x 10 x 10] - 1 + (bcos 222222 covered above) [10 x 10 x 1 x 10 x 10 x 10] - 2 + (bcos 222222 & 22222 covered) [10 x 10 x 10 x 1 x 10 x 10] - 3 [10 x 10 x 10 x 10 x 1 x 10] - 4 [10 x 10 x 10 x 10 x 10 x 1] - 5 = 600000 - 15 = 599985Continuation from above from 1 upto 1 with n 'zeros' (e.g. 10 has 1 zero, 100 has 2 zero, etc), answer = n(10^[n-1]) - 0.5n(n-1) So upto 1000000 would give 6 x 10 ^ 5 - 0.5 x 6 x 5 = 599985The idea is to exploit the symmetry among 0,1,2...9. Instead of 1->10^6, one should think of 000000 -> 999999, where 0-9 occurs with the same probablity . Altogether 000000 -> 999999 has 10^6 numbers, 6*10^6 digits; divided by 10 this is 600,000.The idea is recursion, let x_n be number of times that digit 2 appear in 0 to the largest n digit number. For example, x_1 = number of times that 2 appears in 0-9. x_2 is up until 99, etc. you work out to see x_1 = 1. x_2 = 10*x_1 + 10 etc. finally, I think you will get 600000

21 Jul 2010
 If there was a drawer in front of me containing 4 socks, either black or white, and I know that I have a 50% probability of pulling out two white socks in a row, then what is the probability of pulling out two black socks?5 AnswersThere is zero probability of pulling two black socks.Assuming there are 2 whites and 2 blacks then getting 2 socks of the same colour is the sameAbove meant to say: Has the same probabilityShow more responsesYou can't assume there are two white socks and two black socks. This problem is an easy enumeration problem actually. From the problem, you have at least 2 white socks, otherwise it would be impossible to take out 2 in a row. So you have either 2 white socks, 3 or 4. Just compute the three prob of getting two white socks in a row for all case and see which is 50%. P(two w in a row| 2 white socks) = (2/4) * (1/3) = 1/6 => not two socks. P(two w in a row| 3 white socks) = (3/4) * (2/3) = 1/2 => this is our answer. Obviously, if there were 4 socks, we would have a 100% chance of getting two whites in a row. So as calculated, there must be 3 white socks.The probability is 0 as there is only 1 black sock. Solution: Assume there are k white socks and 4-k black ones in the drawer. => 0.5 = P(2 white socks in a row) = k/4 * (k-1)/3 => k^2 - k - 6 = 0 => k = 3 is the number of white socks. qed.

3 Sep 2012
 Pretty standard question that has been asked before... keep flipping a coin until a winning combination appears (either HHT or HTT). Which strategy would you pick given the choice and why. Find the probabilities of winning associated with each strategy.5 AnswersEssentially HHT is the better strategy. The probabilities are 2/3 HHT and 1/3 HTT. To see this if you draw a tree diagram (best to draw 4-5 iterations if you can't see it) and look at all the possible ways of winning. It turns out HHT is twice as likely to win hence the 2/3, 1/3 split.By drawing 5 iterations, both HHT and HTT seem to make an appearance 7 times. How is HHT twice as likely to win?The mathematical expectation of hte number of flipping for both compbinations is 25/2. In any case the probabilities of appearance of these compbinations are the same, so one can use both strategies with the same result. 50% 50%Show more responsesBecause you can throw h h h and all you need to throw is a tails to get HHt, but there is no fail, please play again throw for htt, so yes, on a throw of 3, they have th same probability, but in a continued series you can play again on h h t if you fail on th 3rd throw.Note that both HHT and HTT combination starts with H, so you can almost neglect H, so when you first observe an H, you wait for HT or TT both of which are equally as likely given the order matters i.e. (HT and TH are different), hence both should be good strategies.

16 May 2012
 n unbiased coins. What is the probability that half of them exactly are heads. Answer the question for n= 2, 3, 200006 AnswersImagine the sequence: HHTTTHTHHHTT .... , length n. It has n! different permutations, but some are indistinguishable because of subsets like HHH or TTT.. . So, we overcounted by a! times b!, where a = total #H and b = #T in the sequence. as a+b = n , a = n/2 , all together this means n!/((n/2)!*(n/2)!) distinguishable combinations. final answer is: Prob(half are heads ) = #success outcomes/total outcomes = n!/ ( n/2 ! * n/2 ! * 2^n ) Prob ( H | 2 flips ) = 2! / ( 2^2) = 2 / 4 = 50% Prob ( HH| 4 flips ) = 4! / ( 2! 2! * 2^4) = 24 / ( 4 * 16 ) = 6/16 = 37.5% Note that there is a simpler way to look the problem: the number of successes ( heads ) follows a binomial distribution. P( X = x number of H | 0.5 chance, n trials ) = nCx * 0.5^(x) * 0.5^(n - x ) = nCx / 2^n which is in agreement with my justification above.for high numbers n=20000 use the Central limit theorem to approximate the outcome by a Gaussian distribution, no way to calculate nC(n/2) for high numbersIndeed, for large numbers, one should use B(n,p) ~ N(np, np(1-p) ). Then, compute the integral of N() over 1 unit, centered around the mean. The exponential bit is 1, so only the normalization factor in front matters, and that is 1/ ( sqrt ( n p ( 1-p) 2Pi)). For n = 400, binomial gives 4.0%, whereas the gaussian integral gives 3.98%.Show more responsesP = 0 if n is odd P = [n! / (0.5*n)!^2] x (0.5)^n for n =2, P = 0.5 for n = 3, P = 0 for n = 20000, P = [20000! / (10000!^2)] x (1/2) ^ 20000The probability is exactly [ [ n / 2 ]! ]^2 / n! as explained above For large n, this can be approximated using Stirling's approximation: ln(n!) ~= n [ ln(n) - 1 ] where ln(n) is the natural log of n Therefore, the probability is approximately exp( [ n * ln(1/2) ] - 1 ) For n=2000, this gives a probability of 3.20*10^-603 which is close to the 'exact answer' of 4.88*10^-601 according to WolframAlphause stirling's approximation n! ~ sqrt(2 * pi * n) * (n/e)^n

16 May 2012
 2 fair dice. What is the probability of both showing six if I have observed at least one six.6 Answers1/6. Independent probabilities, so seeing one makes no difference to the second.Not quite... The subtlety is "at least one". From two dice rolls there are 6*6 = 36 distinct outcomes, of these, 11 contain at least one six, i.e. (6,1), (6,2), (6,3), (6,4), (6,5), (6,6), (5,6), (4,6), (3,6), (2,6), (1,6), therefore P( (6,6) | at least one 6 ) = 1 / 11.More formally: P(observe one 6 ) = P( 1st die is 6 OR 2nd die is 6 ) = P(1st is 6) + P(2nd is 6) - P(1st 6)*P(2nd 6) = 1/6 + 1/6 - 1/36 = 11/36, by reunion. Now, we want to calculate P(both are 6's | observed one 6 ) = P ( observe one 6 | both are 6's) * P ( both are 6's) / P ( observe one 6 ) = 100% * 1/36 * 36/11 , where last factor was calculated above. So, all together P (both 6's| obs. one 6) = 1/11Show more responses11 possibilities of getting at least one six (6 x 1 + 1 x 6 - 1) so P = 1/11I disagree with the above: P(rolling at least one 6) = 1 - p(rolling no 6). rolling no 6 twice in a row = (5/6)^2. = 25/36 therefore 1 - 25/36 = 11/36. I thought njm had answered it halfway through his answer but then somehow arrived at 1/11? I believe he looked at 11 outcomes, instead of the initial 36.Ah I do apologise, mis read the question! yes you are all right! ha