• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Quantitative Interview questions and answers

Join the diagonals of a regular pentagon to form a smaller pentagon. Each vertex of the smaller pentagon is the intersection of two diagonals of the original pentagon. Find the ratio of the area of the smaller pentagon to that of the original pentagon.

Connect each vertex to its other vertices. Now we can see a "star" shaped figure. The interior of the "star" is a regular pentagon(regular by symmetry of the figure). Now using similar triangles and a little bit of ordinary geometry (and ofcourse, sum of the exterior angles of a figure is 2(\pi)). Now finally the ratio of the sides is (the new pentagons side to the original side is)(\frac{1}{(2 * cos(\pi / 5))^2} )
 
Hi ramnik,

What's that x doing in your answer? The correct answer has no mystery in it! It is one definite concrete quantity, without any unknown in it.

This problem is more difficult than it seems at first sight.
 
Connect each vertex to its other vertices. Now we can see a "star" shaped figure. The interior of the "star" is a regular pentagon(regular by symmetry of the figure). Now using similar triangles and a little bit of ordinary geometry (and ofcourse, sum of the exterior angles of a figure is 2(\pi)). Now finally the ratio of the sides is (the new pentagons side to the original side is)(\frac{1}{(2 * cos(\pi / 5))^2} )


Notwithstanding your correction of your answer (changing "x" to "*"), there is still an important detail to attend to: You need to express cos((\pi)/5) in algebraic terms. That is, you've got to express cos((\pi)/5) in terms of radicals and other stuff without trig functions.

Now, that's a challenge!
 
[FONT=&quot]Anybody has idea how to solve this one:
A basket has N balls which are numbered. N is an integer between 1 and 100. You randomly pick a ball and find that it is the 5th ball. What is your best guess of what N is? [/FONT]
 
jonylee wrote:

"[FONT=&quot]Anybody has idea how to solve this one:
A basket has N balls which are numbered. N is an integer between 1 and 100. You randomly pick a ball and find that it is the 5th ball. What is your best guess of what N is?"

[/FONT] [FONT=&quot]Problem Restated:[/FONT]

[FONT=&quot]Let K be a positive integer. A number N with uniform probability is chosen from the set {1,2,[/FONT]…[FONT=&quot],K}. Now from a basket containing balls numbered from 1 through N a ball is randomly chosen (with uniform probability). Let the random variable X denote the value of the randomly chosen ball. Estimate the value of N given that X=a, where a is a known integer.[/FONT]

[FONT=&quot]Relative to the original problem, K=100, a=5.[/FONT]

[FONT=&quot]Solution:[/FONT]

[FONT=&quot]We are to estimate E[N | X=a].[/FONT]

[FONT=&quot]First we will find probability P{X=a}:[/FONT]

[FONT=&quot]P{X=a} = sigma{P{X=a | N=j}*P{N=j} as j runs from a through K} [/FONT]

[FONT=&quot] = sigma{(1/j)*(1/K) as j runs from a through K} [/FONT]

[FONT=&quot] = (1/K)* sigma{(1/j) as j runs from a through K}.[/FONT]

[FONT=&quot]To recap, [/FONT]

[FONT=&quot]P{X=a} = (1/K)* sigma{(1/t) as t runs from a through K}. (**1**)[/FONT]



[FONT=&quot]Now we will compute P{N=j | X=a} for a<=j<=K:[/FONT]

[FONT=&quot]P{N=j | X=a} = P{N=j & X=a} / P{X=a} [/FONT]

[FONT=&quot]= P{X=a | N=j}*P{N=j} / P{X=a}[/FONT]

[FONT=&quot]=(1/j)*(1/K) / P{X=a}.[/FONT]

[FONT=&quot]But by (**1**), we have[/FONT]

[FONT=&quot]P{N=j | X=a} = (1/j)*(1/K) / P{X=a} = (1/j)*(1/K) / (1/K)* sigma{(1/t) as t runs from a through K}, which simplifies to[/FONT]

[FONT=&quot]P{N=j | X=a} = (1/j) / sigma{(1/t) as t runs from a through K}. (**2**)[/FONT]


Now let’s compute [FONT=&quot]E[N | X=a]:[/FONT]

[FONT=&quot]E[N | X=a] = sigma{j*P{N=j | X=a} as j runs from a through K}[/FONT]

[FONT=&quot] = sigma{j*(1/j) / sigma{(1/t) as t runs from a through K} as j runs from a through K}[/FONT]

[FONT=&quot] =[/FONT][FONT=&quot] sigma{1 / sigma{(1/t) as t runs from a through K} as j runs from a through K}[/FONT]

[FONT=&quot]=[/FONT][FONT=&quot] sigma{1 as j runs from a through K} / sigma{(1/t) as t runs from a through K}[/FONT]

[FONT=&quot]= (K+1-a) / sigma{(1/t) as t runs from a through K}.[/FONT]


[FONT=&quot]To recap,[/FONT]

[FONT=&quot]E[N | X=a] = (K+1-a) / sigma{(1/t) as t runs from a through K}.[/FONT]

[FONT=&quot]In term of K=100, a=5, we have:[/FONT]

[FONT=&quot]E[N | X=5] = (96) / sigma{(1/t) as t runs from 5 through 100}.[/FONT]
 
Hi, quantyst, thanks you.

I got another one on Brownian motion: Suppose price S_t follows dS_t = mu dt + sigma dW_t. M_t is its running maximum. Define a stopping time tau = inf{t>0: S_t < M_t - C}, C is a known constant. What is the expected stopping time E[tau].
 
Cute Coloring of a Cube

An ordinary three-dimensional die consists of six sides (i.e., surfaces), with each side (i.e., surface) having a unique number from the set {1,2,3,4,5,6}. But instead of each side (i.e., surface) being numbered, imagine each side (i.e., surface) had a unique color from the set {Yellow, White, Green, Orange, Blue, Hazel}, for short, {Y,W,G,O,B,H}.

Questions:

1. How many different dice can be built with each side having a color from the set {Y,W,G,O,B,H} such that no two sides have the same color?

2. How many different dice can be built with each side having a color from the set {Y,W,G,O,B,H}? Here, it is possible for two sides to have the same color.

3. Answer questions 1 and 2 with respect to a four-dimensional die. Refer to the set of colors as {1,2,3,...,C}, where C is the number of 'sides' of the die.

4. Answer questions 1 and 2 with respect to an n-dimensional die. Refer to the set of colors as {1,2,3,...,C}, where C is the number of 'sides' of the die.


----> Note: The 'side' of an n-dimensional cube is an (n-1)-dimensional cube.
 
E[m/M]

Let X(1), X(2), ... be a sequence of iid uniform random variables over [0,1].

Let M=M(n)=max{X(1), X(2), ..., X(n)} and m=m(n)= min{X(1), X(2), ..., X(n)}.

Compute E[m/M].
 
Sun Giveth, Earth Receiveth

Assume the Sun with radius R and the Earth with radius r are perfect spheres, and further assume that their centers are a distance D apart. If the Sun releases per second a total energy E uniformly in all directions, how much of it is captured by the Earth?
 
f(z)=cra(z)y

Let f:R ---> R be defined as follows:

f(z) = 4(z^3) + 12(pi) z cos(z) - 12(pi) sin(z) + 3((pi)^2) z.

Find the EXACT extreme values of f(z) and the EXACT points at which it attains these extreme values.
 
Buffon’s Needle Punctures Intuition

Consider a set A of infinitely many parallel lines that are consecutively one unit apart. Consider another set B of infinitely many parallel lines that are also consecutively one unit apart, but are all perpendicular to all the lines in set A. That is, each line of B is perpendicular to all the lines of A, and each line of A is perpendicular to all the lines of B. Let C=AUB. Imagine the set C is represented on a plane before you.

There are two boxes that contain needles. Box X has exactly one needle of length x. Box Y has N identical needles each of length y, where N is a known finite number.

You can either choose Box X or Box Y to throw the contents onto the set C. You win a big sum of money if a needle crosses any line in the set C.

(1)[FONT=&quot] [/FONT]Assuming that all you know is the difference (x-y), which is positive but very small, which box would you choose and why? If the question cannot be answered, tell why.

(2)[FONT=&quot] [/FONT]To reformulate the question: What relationship between N and (x-y) should hold so that you would choose box A? If the question cannot be answered, tell why.

(3)[FONT=&quot] [/FONT]To reformulate once more, if you knew what x and y are, which box would you choose now? Discuss over different ranges of values for x and y.
 
Buffon’s Needle Breaks in Two!

A set S of infinitely many parallel lines, each adjacent pair one unit distance apart, is given in the plane. A needle of unit length is dropped onto the plane. But as it lands it breaks into two pieces of random lengths (with uniform probability) and each piece falls randomly (with uniform probability) on the plane. Find the probability that at least one of the two pieces will cross a line in S.

Before you do the math, what does your intuition predict? And why does it predict the way it does?

After you do the math and get the result, did your intuition predict correctly? If not, how is your intuition now better informed? Why do you think the math result is the way it is, especially if it is different than your intuition?

Now, imagine the needle breaks into n random lengths (with uniform probability). Now answer the same question.
 
Easy Probability?

A magician pulls out an ordinary deck of playing cards and gives it to a random member of the audience to both examine and thoroughly shuffle it and put it all inside an empty cardboard box. He then tells the audience that he will randomly pull out a card from the box without looking inside and predicts that the card will be the ace of hearts.

What is the probability that the magician pulls out the ace of hearts?
 
A magician pulls out an ordinary deck of playing cards and gives it to a random member of the audience to both examine and thoroughly shuffle it and put it all inside an empty cardboard box. He then tells the audience that he will randomly pull out a card from the box without looking inside and predicts that the card will be the ace of hearts.

What is the probability that the magician pulls out the ace of hearts?

Probability is 1. He is a magician, so the ace was up his sleeve.
 
Follow Up on Easy Probability!

Jill and Jane are two collaborating magicians. Jill pulls out an ordinary deck of playing cards and gives it to a random member of the audience to both examine and thoroughly shuffle it and put it all inside an empty cardboard box. She then tells the audience that she will randomly pull out a card from the box without looking inside and predicts that the card will be the Ace of Hearts. Her partner, Jane, tells the audience that after Jill pulls out her card and holds onto it, she will randomly pull out a card from the box without looking inside and predicts that the card will be the Ace of Hearts.

Now, what is the probability that one of the two magicians will not pull out an Ace of Hearts?
 
A candy factory has an endless supply of red, orange, yellow, green, blue, and violet jelly beans. The factory packages the jelly beans into jars of 100 jelly beans each. One possible color distribution, for example, is a jar of 58 red, 22 yellow, and 20 green jelly beans. As a marketing gimmick, the factory guarantees that no two jars have the same color distribution. What is the maximum number of jars the factory can produce?
 
Candy Factoryal

This is classic. It's also basic but important in combinatorial math.

A restatement: There are k colors/types of jelly beans and each jar contains exactly n jelly beans. How many different jars can be produced (or are there)?

Solution:

Let x(i) denote the number of jelly beans of type i in the jar where i belongs to the set {1,2,...,k}. Clearly x(i) belongs to the set {0,1,2,...,n}. In each jar we have:

x(1)+x(2)+...+x(k)=n. (**1**)

So, we are after the number of solutions to (**1**).

There are couple of ways one can approach the problem. One is doing recursion. The second is a more direct combinatorial approach.

I will leave the frist approach to others and will focus on the second approach here:

Take any jar and pour out its contents onto a table and group like jelly beans together ALL on a straight line. For example, for k=4 and n=9, here are some arrangements of jelly beans:

Below you will see smiley faces separated by |. Going from left to right, the first few faces before the first | represent the first type of jelly beans in the jar. Continuing to the right, the group of faces to the right of the first | but to the left of the second | represents the second type of jelly beans. An so on.




(1) 4:) | :) | :) | 3:)

(2) 6:) | | 2:) | :)

(3) :) | :) | :) | 6:)

(4) | | :) | 8:)

(5) 4:) | | | 5:)

(6) 4:) | 5:) | |

(7) 9:) | | |




The first line says there are 4 jelly beans of type 1, 1 of type 2, 1 of type 3, 3 of type 4.

The second line says there are 6 jelly beans of type 1, 0 of type 2, 2 of type 3, and 1 of type 4.

The fourth line says there are 0 of type 1, 0 of type 2, 1 of type 3, 8 of type 4.

The fifth line says there are 4 of type 1, 0 of type 2, 0 of type 3, 5 of type 4.

The sixth line says there are 4 of type 1, 5 of type 2, 0 of type 3, 0 of type 4.

The seventh line says there are 9 of type 1, 0 of type 2, 0 of type 3, 0 of type 4.



As we look at the seven cases above we make an unavoidable observation: In each line we have two kinds of symbol: smiley face and a bar |. There are 9 smiley faces and 3 bars |. Every lline is a linear arrangement of 9 faces with three bars. So, we have 9+3=12 things, of which 3 are bars and the rest faces. In how many ways can this be done? Obviously, C(12,3); i.e., 12 choose 3.

Now, in the general case, we have k variables x(i), which are separated in the equation by (k-1) plus signs (+). Each plus sign (+), like the bar |, is a separator. So, we have n beans to be separated into their respective groups by (k-1) bars. So, we have a total of n+(k-1) things of which (k-1) are bars |, and the rest are faces. So, the answer is C(n+k-1, k-1).

So, for n=100, k=6, we have the answer as: C(105, 5).
 
LOGUATION

Find ALL positive integers x and y such that the following equation (involving Log functions BASE 2) holds:


(Log(x))/(Log(y)) = Log(x/y).


Prove your answer exhausts all solutions!
 
Folded Rectangle

[FONT=&quot]Take a rectangular piece of paper ABCD. Point E is somewhere on side AB, point F is somewhere on side BC, G is somewhere on side CD, and points H and K are somewhere on side DA. Now we fold the paper along the line segment HF and flatten the folded paper. Suppose that as we do this the point C coincides with the point E and the point G coincides with the point K.[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Suppose we are given the values AK=m, BF=p, AB=w, along with the condition AE<EB.[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Find the length BC in terms of m, p, w.[/FONT]
 
Back
Top