Math 318 Assignment 1 (北美程序代写,加拿大程序代写,数学Math代写,University of British Columbia代写)

A coin is tossed until either two Heads appear successively

联系我们
微信: biyeprodaixie 欢迎联系咨询

本次CS代写的主要涉及如下领域: 北美程序代写,加拿大程序代写,数学Math代写,University of British Columbia代写

January 8, 2020

 

Math 318 Assignment 1: Due Wednesday, January 15 at start of class

  1. Problems to be handed in: Always provide clear explanations of your solutions, not merely answers. In particular,  in problems involving permutations and combinations, be sure to explain  all factors arising in your solution.

 

    1. A coin is tossed until either two Heads appear successively, or until the fifth toss, whichever comes first.  Write  down the sample space,  and determine the probability of each outcome  in the sample space.
    2. Ross: Chapter 1 #4.
    3. An ecology graduate student goes to a pond and captures 40 water beetles, marks each with a dot of paint, and then releases them. A few days later she goes back and captures another sample of 60, finding 12 marked beetles and 48 unmarked.
      1. Assuming that the pond contains n beetles, determine the probability L(n) that a catch of 60 beetles will contain 12 marked ones.
      2. Show that the function L(n) is initially an increasing function of n which then becomes decreasing after reaching a maximum value. Find the maximum likelihood estimate for n; that is the value of n which maximizes L(n).

Hint: when does the inequality L(n)/L(n − 1) ≤ 1 hold?

    1. (a) Compute the probability that a poker hand contains:
  1. one pair (aabcd with a, b, c, d distinct face values; answer:   0.4226)
  2. two  pairs (aabbc with a, b, c distinct face values; answer:   0.04754)
  1. Poker dice is played by simultaneously rolling 5 dice. Compute the probabilities of the following outcomes:
    1. one pair (aabcd with a, b, c, d distinct numbers; answer: 0.4630)
    2. two pairs (aabbc with a, b, c distinct numbers; answer: 0.2315)
    1.  

Σ

The number of ways to place n distinguishable balls in m urns is mn, since each ball can

 

 

n1 ,...,nm

be placed in any one of the m urns.  The multinomial coefficient .  n

=     n!     

n1 !···nm!

 

counts the number of ways  that ni balls are in urn i for each i = 1, 2, . . . , m, so  when

each ball is randomly assigned to an urn, the probability that ni balls are in urn i, for

 

n1 ,...,nm

each i, is equal to .     n       Σm−n. Systems described by these probabilities are said to obey

Maxwell–Boltzmann statistics.

      1.  

{                  }                                         ≥

Suppose instead that the balls are indistinguishable; now we speak of Bose–Einstein statistics.   When there are m = 2 urns,  the number of ways  of putting the n balls       in the 2 urns is n + 1, because an outcome is specified by  saying how many balls are   in urn 1 and the possibilities are 0, 1, 2, . . . , n . For the case of general m 1, how many ways are there to place n indistinguishable balls in m urns?

Hint: This is the number of ways to arrange m − 1 barriers among a row of n balls, e.g., for n = 7 and m = 3 the configuration with n1 = 0, n2 = 2, n3 = 5 is | ◦ ◦| ◦ ◦ ◦ ◦◦.

      1. Indistinguishable particles are said to obey Fermi–Dirac statistics if all arrangements that have at most one ball per urn have the same probability. How many ways can n of these particles be put into m n urns?
 
    1. Use Python (in a Jupyter notebook) to write a program that will do the following.
      1. Write a function birthday(n) that:
        1.  

{                 }

generates a vector containing n numbers uniformly distributed on 1, 2, . . . , 365 (think of this as the list of birthdays of n people. You can use the randint function from numpy.random.),

        1. returns 1 if there is at least one pair of people with coinciding birthdays (a “match”), and 0 otherwise.
      1. For n = 2 to 60, run the function birthday(n) 1000 times, and compute the proportion

X(n) of the 1000 times in which there was a match. Hint: set A(n,i)=birthday(n)

 

(c) Let

 
 

 

 

1000

i=1

for i = 1, . . . , 1000 and put X(n) = 1 Σ1000 A(n, i).

Y (n) = 1     365 · 364 · · · (365 n + 1) .

 

365n

On a single graph, plot X(n) and Y (n) vs n ∈ [2, 60].

Print and submit your program and output. Your code should be easy to read and ad- equately commented. Submit hard copies, no email, and do not use other programming languages.

 

  1. Recommended problems: These provide additional practice but are not to be handed in. Starred problems have solutions in the text, and answers are given otherwise.

Ross, Chapter 1: 2*, 5*, 6, 7, 8, 9*, 10, 11 ( 1 , 2 , 3 , 4 , 5 , 6 , 5 , 4 , 3 , 2 , 1 ), 17*.

36 36 36 36 36 36 36 36 36 36 36