7 7.04755 3 3.01372 7 7.00747 3 3.00782
Added by Nicole D.
Close
Step 1
Include the randFloat function in your program. Show more…
Show all steps
Your feedback will help us improve your experience
Sri K and 81 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
(a) Recalling the definition of σ² for a single rv X, write a formula that would be appropriate for computing the variance of a function h(X, Y) of two random variables. [Hint: Remember that variance is just a special expected value.] V[h(X, Y)] = E{[h(X, Y) − E(h(X, Y))]²} = Σ_x Σ_y [h(x, y) − E(h(X, Y))]² · p(x, y) (b) An instructor has given a short quiz consisting of two parts. For a randomly selected student, let X = the number of points earned on the first part and Y = the number of points earned on the second part. Suppose that the joint pmf of X and Y is given in the accompanying table. p(x, y) | y: 0 5 10 15 x 0 | 0.03 0.06 0.02 0.10 x 5 | 0.04 0.17 0.20 0.10 x 10 | 0.01 0.15 0.11 0.01 Use the formula from part (a) to compute the variance of the recorded score h(X, Y) [ = max(X, Y)] if the maximum of the two scores is recorded. (Round your answer to two decimal places.) V[max(X, Y)] =
Keondre P.
Generate a sequence of i.i.d. (independent identically distributed) random variables T = {Tn, N ≥ n ≥ 1} which are geometrically distributed with parameter (intensity) p = 0.1 for N = 5000, 10000, 50000. The random variable Tn for such case is governed by the distribution P{Tn = k} = (1 − p)^{k−1} p, k = 1, 2, 3, ⋯. To verify the results you obtain, for each case of N, please A. Draw probability distribution histograms which show the relative frequency of T in terms of n, for n = 1, 2, ⋯, 30. B. Compute the sample mean and sample variance. Compare your simulation results with the theoretical values. Note (1): The i.i.d. sequence T = {Tn, N ≥ n ≥ 1} often represents the inter arrival time sequence for the discrete time stochastic processes. In such process, time is divided into slots. Each slot is of unit length and is marked by discrete times 1, 2, ⋯,. An event (arrival) may occur with probability p within one slot duration and is recorded at the end of the slot. If the sequence T is geometrically distributed, the corresponding arrival process A is called the geometric point process. Note (2): To generate a sequence of i.i.d. Geometric random variable T = {Tn, N ≥ n ≥ 1} with the parameter p, 0 < p < 1, you may first generate a sequence of i.i.d. uniform random variables U = {Un, N ≥ n ≥ 1} over [0, 1]. Then for each sample, use the transformation Tn = 1 + [ln Un / ln(1 − p)]. where [x] represents the largest integer less than or equal to x.
Sri K.
Consider the following functions on R p1(x) = c1 −1 < x < 1 0 otherwise. p2(x) = c2(x + 1) −1 < x ≤ 0 c2(1 − x) 0 < x < 1 0 otherwise. with c1, c2 real numbers. (i) Find the values of the constants c1 and c2 such that p1 and p2 are probability densities; (ii) Let X1 ∰ p1 and X2 ∰ p2. Find the expected value of each random variable; (iii) Without making computations, explain wich random variable has a higher variance;
Lucas F.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD