本次CS代写的主要涉及如下领域: 北美程序代写,加拿大程序代写,数学Math代写,University of British Columbia代写
January 8, 2020
Math 318 Assignment 1: Due Wednesday, January 15 at start of class
- 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.
-
- 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.
- Ross: Chapter 1 #4.
- 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.
- Assuming that the pond contains n beetles, determine the probability L(n) that a catch of 60 beetles will contain 12 marked ones.
- 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?
-
- (a) Compute the probability that a poker hand contains:
- one pair (aabcd with a, b, c, d distinct face values; answer: 0.4226)
- two pairs (aabbc with a, b, c distinct face values; answer: 0.04754)
- Poker dice is played by simultaneously rolling 5 dice. Compute the probabilities of the following outcomes:
- one pair (aabcd with a, b, c, d distinct numbers; answer: 0.4630)
- two pairs (aabbc with a, b, c distinct numbers; answer: 0.2315)
|
|
= 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
|
Maxwell–Boltzmann statistics.
|
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 | ◦ ◦| ◦ ◦ ◦ ◦◦.
-
-
- 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?
-
-
- Use Python (in a Jupyter notebook) to write a program that will do the following.
- Write a function birthday(n) that:
- Write a function birthday(n) that:
- Use Python (in a Jupyter notebook) to write a program that will do the following.
|
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.),
-
-
-
- returns 1 if there is at least one pair of people with coinciding birthdays (a “match”), and 0 otherwise.
- 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 |
|
|
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.
- 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