R CODE:
1. A bag contains n distinct (all different) numbers: (x1; x2; : : : ; xn) . Per-
son A draws a number at random, while person B draws a number from
the remaining choices. What is the exact probability that A's number is
greater than B's number? Explain your reasoning in detail.
The exact probability is 1/2. We can derive this mathematically,
but before that let me give you a more intuitive explanation.
Since both the numbers are always distinct, let A choose
xi and B choose xj, xi =/=
xj
Then either xi<xj or xi>xj.
Without loss of generality, assume A<B. Then, swap the choices
of A and B and we get A>B. This can be done for every choice of
A and B. Thus there are exactly equal number of outcomes for both
the cases. Thus the probability of A's number being greater than
B's number is exactly 1/2.
A more mathematical approach is given below.
You can also run an R program to simulate this scenario and see
the result approaching 1/2
If you can't write the code yourself, follow up in comments.
R CODE: 1. A bag contains n distinct (all different) numbers: (x1; x2; : : :...
Consider The problem of determining whether an arbitrary sequence [x1,x2,...,xn] of n numbers contains repeated occurrences of some number. Show that this can be done in O(nlogn) time.
A bag contains 10 10 g r e e n g r e e n marbles, 9 9 b l a c k b l a c k marbles, 7 7 y e l l o w y e l l o w marbles. If one marble is drawn from the bag then replaced, what is the probability of drawing a g r e e n g r e e n marble then a y e l l o w...
Applied and Computational Questions 1. Pairs of random numbers (r, y) a. How many different pairs are possible? are generated. X and Y are integers between 0 and 5 inclusive. a random variable W is defined to equal the absolute value of the difference between X b. Suppose and Y. How many distinct values are possible for W? Give the pair of dice is rolled once. 2. Let x represent the number of times a one appears when a probability...
5. Three boxes are numbered 1, 2 and 3. For k 1, 2, 3, box k contains k blue marbles and 5 - k red marbles. In a two-step experiment, a box is selected and 2 marbles are drawn from it without replacement. If the probability of selecting box k is proportional to k, then the probability that two marbles drawn have different colours is 6. Two balls are.dropped in such a way that each ball is equally likely to...
For z e R and θ (0, 1), define otherwise. Let X1 , . . . , X" be i..d. random variables with density f, for some unknown θ E (0, 1) 1 point possible (graded, results hidden) To prepare, sketch the pdf f, (z) for different values of θ E (0,1) Which of the following properties of fo (z) guarantee that it is a probability density? (Check all that apply) Note (added May 3) Note that you are not...
photos for each question are all in a row (1 point) In the following questions, use the normal distribution to find a confidence interval for a difference in proportions pu - P2 given the relevant sample results. Give the best point estimate for p. - P2, the margin of error, and the confidence interval. Assume the results come from random samples. Give your answers to 4 decimal places. 300. Use 1. A 80% interval for pı - P2 given that...