**Question : Three points, say , are drawn independently from uniform distribution , what is the probability that **

is the probability that

Similarly, is the probability that and

is the probability that

Then required probability is

An attempt to pass time wisely

**Question : Three points, say , are drawn independently from uniform distribution , what is the probability that **

is the probability that

Similarly, is the probability that and

is the probability that

Then required probability is

Advertisements

What is the expected value of minimum of i.i.d random variables that are drawn from U(0,1) distribution

Let are the random variables.

Let

Plan of Action

- Find CDF for X
- Find PDF for X using CDF
- Compute

Note that

Thus

so

Alternative way :

For non-negative random variables, some times it is easy to calculate expected value of random variable using following formula :

Since in our case cannot take value greater than 1

Theorem : no matter what quadrilateral you start with, you always get a parallelogram when you connect the midpoints.

Proof :

Assuming that next I/O request resides in any cylinder with equal probability, what is the distance travelled by head, on average, between successive seeks on disk with cylinders.

D = random variable denoting the distance travelled between successive seeks

For description of the problem see Threaded Pins

How many pieces of thread will be needed in general ? i.e; given number of pins N and clockwise gap G, Express the number of Threads needed T, as a function of N & G.

Source : ” Thinking Mathematically ” by John Mason et.al

PS: This problem is related to “rotation of array” problem where you are asked to rotate the array by a given amount using only O(1) extra space. For example, rotating array containing 3, 5, 9, 14, 1, 2, 11 by 3 positions will yield 14, 1, 2, 11, 3, 5, 9.

PPS : I highly recommend “Thinking Mathematically” for kids, it helps to develop good practices which aid in solving problems.

You have coins . For each *k*, coin is biased so that, when tossed, it has probability of falling heads. If the *n* coins are tossed, what is the probability that number of heads is odd? Express the answer as a rational function of *n* ?

Let denote the desired probability. Then , and for , By conditioning on coin’s outcome, we can see that

Using above recurrence we get . Now it is easy to guess that . It is easy to verify this guess using Mathematical Induction.

Now, let us see alternative way to derive the same result using Generating Functions.

If is a discrete random variable taking values on some subset of the non-negative integers,{0,1,….,n}, then the probability-generating function of X is defined as :

where symbol denotes the Expectation of Random Variable.

If is a sequence of independent ( not necessarily identically distributed ) random variables, and , then the probability-generating function of is given by

.

The last equality follows from the fact that the expectation of product of independent random variables is equal to the product of expectation of individual random variables.

Let the probability of heads on be donted by . So . Let

Let denote the indicator random variable, which takes on value 1 if falls on heads, takes value 0 otherwise

P.G.F of is

Let denote the number of heads in the *n* coin tosses. So

P.G.F of is

The probability of getting exactly *m* heads is equal to the coefficient of in the generating fucntion, that is .

Since the coin tosses are independent,

Notice that

and

The required probability is

Hence

It is easy to interpret the result of substituting 1 for *z *in terms of probability : it is the probability of Sample Space , which is 1. The result of substituting -1 for *z,* is the Difference between probability of getting Even number of heads and probability of getting Odd number of heads ( Generating functions actually helped in calculating this difference easily ). The difference is equal to . In retrospect, we can see why this is so. If we expand this product we see that each +ve term in the expansion correspond to the probability of some sample point which has even number of heads in it, and each -ve term in the expansion correspond to probability of some sample point which has Odd number of heads in it. Hence the sum of +ve terms is equal to probability of getting Even number of heads, and the sum of -ve terms is equal to probability of getting Odd number of heads.

String *A *can be *chained* with string* B *, if the* last* letter of *A *matches with the* first* letter of *B*. For example “GIRI” can be chained with “IDLE”. This can be generalized to a list of strings, string*1 *chains with string*2* which in turn chains with string*3* and so on.

Now, Given a list of *n *strings find if they can be chained together . Note that this is YES/NO question, i.e; you need not come up with the actual order of chaining.

Try to come up with *O(n)* solution.

Using Random5 function ( which returns a integer *k* [1,5] with probability ) , design Random7 function ( which returns a integer *k* [1,7] with probability ).

Consider the set { 1, 2 ,…,* n*} of *n *nodes that attach to each other in the following way. Node 2 attaches to node 1. Node 3 attaches to node 1 with probability and to node 2 with probability . In general, node *k *(* k *= 2, 3 ,..,* n*)* *attaches to a uniformly selected node from the previous ones, independently of previous attachments. The process of *n *steps produces a random rooted tree in which each vertex is one of the nodes and such that *j *being attached to *i *means that *j *is a child of *i*. The resulting trees are called *recursive trees*. Let *size *denote the number of vertices in the recursive tree.

Let be a random variable which denotes the size of the subtree of a randomly chosen vertex in recursive tree of size *m*. Show that

1) For , P( = *m *) =

and, for * *,

2) P( = *k ** *) = , if .

PS:: This result is proved in following paper : ” Breakage and Restoration in Recursive Trees ” . I am looking for different approach. Any Ideas ??