Fifth 5.2 indicator Random variables after class answer study

Source: Internet
Author: User
5.2-1hire-assistant, suppose the candidate appears in a random order, exactly what the probability of hiring once. What is the probability of just employing n times?


The probability of hiring just once is to choose one from N candidates so it's 1/n.


The probability of just employing n times is that there are n candidates at the time of the first hire 1/n, and the second time there are n-1 candidates left, so the probability is 1/(n-1) ... The nth employment candidate, only the last 1 people so is 1/1, then the probability of employing n candidates is 1/(n (n-1) ... 1) =1/n!


In 5.2.2 Hire-assistant, it is assumed that the candidate appears in a random order, just 2 times the probability of hiring.


The probability of a successful employment of the first candidate is 1/n, so the probability is 1/n-i that the remaining N-i candidate hires a 2nd. Therefore, after the first applicant is employed, the probability of the remaining candidate being selected is (1/n) (1/(n-i)) so the total probability p= (1/n) ((1/(n-1) + (1/(n-2) + ...). 1/1) = (1/n) ln (n-1)


5.2.3 uses indicator random variables to calculate the expected value of the sum of the throwing N dice.


The expected value of throwing 1 dice E (x) =1* (1/6) +2* (1/6) +3* (1/6) +4* (1/6) +5* (1/6) +6* (1/6) =3.5
The expectation of throwing n dice the linear property of the expected value: E (x) =e (NX) =ne (x) =3.5n


5.2.4 Hat Storage problem
There were n customers, each of whom gave the restaurant a hat for keeping the hats. The waiter returned the hat to the customer in random order. What is the expected number of customers who get their hats?


The probability of a 1th customer getting his hat is p1=1/n. The probability that the 2nd customer gets their hat is that the 1th customer's hat is second, then the probability of the 2nd customer getting their hat is 0, and in addition, the 2nd customer's hat is in the n-1 of the remaining hat (n-1)/n , the probability of taking your hat out of this n-1 hat is 1/(n-1), so the 2nd customer's probability of taking out his hat is ((n-1)/N) (1/(n-1)) =1/n .... So the probability of the first customer getting their own hat is
((n-i)/N) (1/(n-i)) =1/n


According to lemma 5.1 know E (Xi) =1/n so E (X) =e (X1) +e (X2) +....+e (Xn) = (1/n) *n=1




5.2.5 expected number of reverse order pairs


Suppose A[1..N] is an array of n different numbers. If I<j and A[i]>a[j], it is called (I, J) pairs in reverse order to a. Suppose that the elements of a form <1, 2, ..., a uniform random arrangement on the n>. An indicator random variable is used to calculate the desired number of reverse pairs in a.


From A[1..N] These n elements select 2 elements to form an array pair with a total of Cn2 options. and an array pair (I&LT;J), either a[i]>a[j] or a[i]<a[j], that is, either sequential or reverse. So the probability of reverse alignment is 1/2. According to the indicator random variable (lemma 5.1), set the CN2 number group pair is the expected value of the inverse pair of =1/2 e (Xi). There is a total of Cn2 pairs so that according to the linear nature of the expected value E (x1+x2+. Xn) =e (X1) +e (X2) + ... E (Xn) = (cn2=) (n-1) N/4

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.