Energy Trader Interview Questions | Glassdoor

982

Energy trader interview questions shared by candidates

## Top Interview Questions

Sort: RelevancePopular Date

May 15, 2009

May 2, 2012

Feb 29, 2012

Apr 7, 2011

Feb 26, 2010
 Flip a coin until either HHT or HTT appears. Is one more likely to appear first? If so, which one and with what probability?13 AnswersLet A be the event that HTT comes before HHT. P{A} = P{A|H}P{H} + P{A|T}P{T} = .5P{A|H} + .5P{A|T} P{A|T} = P{A} therefore, P{A|H} = P{A|T} P{A|H} = P{A|HH}P{H} + P{A|HT}P{T} = (0)(.5) + P{A|HT}(.5) Therefore, 2P{A|H} = P{A|HT} P{A|HT} = P{A|HTT}P{T} + P{A|HTH}P{H} = (1)(.5) + P{A|H}(.5) 2P{A|H} = .5 + P{A|H}(.5) P{A|H} = 1/3 and P{A|H} = P{A}, therefore, P{A} = 1/3 So, HHT is more likely to appear first and it appears first 2/3 of the time.P{A|H} = P{A|HH}P{H} + P{A|HT}P{T} = (0)(.5) + P{A|HT}(.5) Need help - - why is P{A|HH} = 0 ?P(A|HH) = 0 because after a sequence of consecutive heads, you can no longer achieve HTT. The moment you get a tail, you will have the sequence HHT. This the reason HHT is more likely to occur first than HTT.Show More ResponsesP(A|HH) = 0 because after a sequence of consecutive heads, you can no longer achieve HTT. The moment you get a tail, you will have the sequence HHT. This the reason HHT is more likely to occur first than HTT.HHT is more likely to appear first than HTT. The probability of HHT appearing first is 2/3 and thus the probability of HTT appearing first is 1/3. Indeed, both sequences need H first. Once H appeared, probability of HHT is 1/2 (b/c all you need is one H), and probability of HTT is 1/4 (b/c you need TT). Thus HHT is twice is likely to appear first. So, if the probability that HTT appears first is x, then the probability that HHT appears first is 2x. Since these are disjoint and together exhaust the whole probability space, x+2x=1. Therefore x=1/3.You guys seem to be mixing order being relevant and order being irrelevant. If order is relevant (meaning HHT is not the same as HTH) then this has a 1/8 of occuring in the first 3 tosses. Also HTT has a 1/8 chance of occurring in the first 3 tosses, making them equally likely. Now, if order is not relevant. (so HHT and THH are the same), then this has a (3 choose 2) * (1/8) probability of happening in the first 3 tosses. The same goes for HTT (which would be the same as THT etc and others) so this has a (3 choose 2) * 1/8 probability of happening in the first 3 tosses as well. Either way they come out to being equally likely, please comment on my mistake if I am doing something wrong.Ending up with HHT more likely (with probabilty 2/3).HHT is more likely (2/3) probability. People with wrong answers: Did you not Monte Carlo this? It takes 5 minutes to write a program, and you can then easily see that 2/3 is correct empirically.I don't get it. Shouldn't P{A|HH} = P{A} in the same sense that P{A|HTH} = P{A} from both HH and HTH we have get the first H from HTT and so it should be P{A|HH} = P{A|HTH} = P{A} Am i wrong?sorry, i meant: I don't get it. Shouldn't P{A|HH} = P{A|H} in the same sense that P{A|HTH} = P{A|H} from both HH and HTH we have get the first H from HTT and so it should be P{A|HH} = P{A|HTH} = P{A|H} Am i wrong?Above link is the best solution I have seen for this problem http://dicedcoins.wordpress.com/2012/07/19/flip-hhh-before-htt/Apologies, Below*Here's my answer. Let x = probability of winning after no heads (or a tail). y=probability after just one heads. z=probability after two heads. w=probability after HT. Thus x=(1/2)x+(1/2)y, y=(1/2)z+(1/2)w, z=1/2 + (1/2)z, w=(1/2)y. Therefore, z=1, y=2/3, w=1/3, x=2/3. We wanted x at the beginning, so it is 2/3 that HHT comes up first.

Oct 5, 2009

Jan 12, 2011
 Russian Roulette - 4 blanks 2 bullets, all in a row. If someone shoots a blank next to you, would you take another shot or spin 12 Answerstake another shot, 3/4 chance of surviving vs 2/3 if you respinHere is my answer: the prob. of survival after re-spin is: 3/5. the prob. of survival with on re-spin is: 1/15 * 6/4 = 1/10.correction: the prob. of survival after re-spin is: 4/6.Show More Responsesmy final correction: the prob. of survival after re-spin is: 4/6 = 2/3 the spin with no spin is: 2/5 = c(4, 2) / c(6, 2).Denoting the blanks by 0's and live bullets by 1's, and adjoining the left and right edges (denoted by ~) , so as to make a cylinder, the following diagram illustrates how the bullets are arranged in the cylinder of the revolver: ~000011~ . Denote the bullet that is to be fired if the trigger is pulled by enclosing it in parenthesis. Denote an empty chamber by *. Assume that when you pull the trigger, the cylinder rotates clockwise (to the right in the diagram above). If when you pulled the trigger for the first time, the bullet was a blank, then before and after you pulled the trigger, the cylinder was and is in one of the following states: 1) Before: ~(0)00011~ After: ~*0001(1)~ 2) Before: ~0(0)0011~ After: ~(0)*0011~ 3) Before: ~00(0)011~ After: ~0(0)*011~ 4) Before: ~000(0)11~. After: ~00(0)*11~ If you pull the trigger again without spinning the cylinder, then only in case one will the bullet be a live bullet, yielding a 3/4 probability of the bullet being a blank . If you spin the cylinder and then pull the trigger, then you have a 4/6=2/3 probability of the bullet being a blank. Clearly, you should not spin the cylinder.don't spin, 3/4 prob survival if not spinnedrespin - 4/6 = 2/3 (obvious) don't spin - you only die if the blank was the "last" one, which is 1/4 chance. hence 3/4 chance of live. since 3/4>2/3 don't spin.Wouldn't play.Spin Spin: 4/6=0.6667 to survive Not Spin: C(4,2)/C(5,2)=3/5=0.6condition on 2 bullet is in consecutive position and someone survives the 1st shot, we have: spin it-> survival rate is 4/6=2/3=67% not spin it-> survival probability=3/4=75% so...not spin it will have a bigger chance of survival.the question did not say that the bullets are next to each other so in this case you should spinI. Using Bayes' Theorem: P[0] = probability of a blank : 4/6 P[1] = probability of a bullet : 2/6 P[1|0] = probability of a bullet given a blank : find this P[0|1] = probability of a blank given a bullet If a bullet occurs then the next pull can be a bullet or a blank and so P[0|1] = 1/2 P[1|0] = P[0|1]*P[1] / P[0] = 1/4 So there is a 25% chance that the next pull is a bullet, or a 75% chance that it is a blank. The first pull had a probability of 8/12 of being a blank. Given a blank on the first pull, the second pull has a 9/12 probability of being a blank. II. From a frequentist perspective: So when the first pull is made and it is a blank the event space decreases from 6 possible outcomes to 4 possible outcomes. The first pull was on the last bullet or the the first pull was on the second to last blank. Out of the four possible events there is one where after the pull the chamber is sitting on the blank right before the bullet. Out of the four events 3 are blanks (3/4) and 1 is a bullet (1/4).

Jan 2, 2010
 N points lie on a circle. You draw lines connecting all the points to each other. These lines divide up the circle into a number of regions. How many regions is this? Assume that the points are scattered in such a way as to give the maximum number of regions for that N.12 Answersn choose 4 + n choose 2 + 1I don't think the above answer is right.What happens if N is less than 4? Even if N is at least four, it still doesn't work For example, take the case when 4 lines are drawn, you can make 11 regions, but Dimitar's formula gives 4c4+4c2+1=8 The way you do it, is you start out with 1 region with 0 lines. Then you draw 1 line to get 2 regions. When the maximum number of regions is created, each new line will cross every previous line and will create a new region each time it crosses line. It also creates a new region just by being created. So the 2nd line makes 2 new regions, the third line makes 3 new regions, the fourth line makes 4 new regions etc. So the answer is the sum of the first N natural numbers +1. In general this is the formula N(N+1)/2+1Hi, I also get Dimtar's formula, you may use the recursion method to do it, which takes some time. Is there any easy way to get this one? Btw, when there are 4 dots on a circle, I think it shoud still give 8 regions. I think 11 is the answer to another problem. If you make n cuts on a circle, the max shares you can create.Show More ResponsesI don't think that is correct. I can't see a way that, while obeying these rules, you can have 11 sections for 4 points. Perhaps the formula 2^(N-1)?i got 2^(N-1) as well1 dot - 1 region 2 dots - 2 regions 3 dots - 4 regions 4 dots - 8 regions 2^(N-1), N greater than or equal to 1The unanswered question (and the reasoning behind the combinations thing) is whether two adjacent regions may have the line that divides them ignored for counting up a them both together as a new region. Dimitar's way assumes you may erase a line and Mike's way does not. However, for Dimitar's way, I think the combinations do not just stop at the nC4 + nC2, but really keep going up to n (and Dimitar just stopped at ~6 when he was testing the base cases). Mike's way assumes each region cannot be made up of sub regions, which I feel is the more correct answer, since it gives a scalable answer without summation/set notation, though you should ask the interviewer which he'd prefer. Let's take the 3 dot example: Mike's thinking: =There's the middle triangle and the 3 arc regions, so 4 Dimitar's thinking: =Mike's + triangle + 1,2,3 regions =4 + 3C1 + 3C2 + 3C3 =4 + 3 + 3 + 1 = 11 which really seems to break down into: 2^n-1+summation(nC1->n). I dislike Dimitar's way, because it invariably includes the entire circle as a "region" that has been created, which seems to go against the spirit of the problem.Err, 2*n-1+summation(n-1C->n-1)This is a famous example in mathematics; it's often used as a warning against naive generalization. Here are the answers for the first six natural numbers: (# points) : (# regions) 1 : 1 2 : 2 3 : 4 4 : 8 5 : 16 6 : 31 Yes, 31. You can see, e.g., Conway and Guy's "The Book of Numbers" for an account of this.it is "Moser's circle problem" 1+nC2+nC4srsly? draw 4 lines yourself and you can easily find its 11The last answer should be 1+(n-1)*n*(n^2-5n+18)/24. At first I thought it's 2^(n-1), because for the first 5 terms it's really the same, but when n=6, it should be 31. Solution: I use recursion. Assume the number of regions for n points is f(n). If we add a new point, we can count how many new regions are created. 1. outside the polygon of original n points, create n new regions. 2. inside the polygon, once the line between the new point and original point cuts the original line, there will be one more region. Label the original points clockwise as 1 2 3 ... n, and the line of the new point with point i will cut (i-1)(n-i) lines. This number is the number of points before the points i times the number of points after the point i. Then how to calculate the sum of (i-1)*(n-i), i.e., sum(k)*n + sum(k*(k+1)). The first term is easy. The second term in fact is a question in the book Heard On the Street. First we guess it's k(k+1)(k+2)/3, and then use mathematical induction to prove it in an easy way. After all, I get f(n+1) = f(n) + n + n*(n-1)*(n-2)/6. And then use recursion and formula for sum(k^3), sum(k^2), sum(k) to get the last answer.