question archive Question a: In engineering simulations, we often generate a floating-point sequence of values with a specified mean and variance

Question a: In engineering simulations, we often generate a floating-point sequence of values with a specified mean and variance

Subject:Computer SciencePrice: Bought3

Question a: In engineering simulations, we often generate a floating-point sequence of values with a specified mean and variance. The rand_float function previously developed allows us to generate numbers between limits a and b, but it does not allow us to specify the mean and variance. By using results from probability, we can derive the relationship between the limits (a, b) ofa uniform random sequence and its theoretical mean p and variance 62. _a+b 2_(b-a)2 .11 — a — 12 2 Write a program that uses the rand_float function previously developed to generate two sequences of 950 points. Each sequence should have the same theoretical mean of 3, but one sequence should have a variance ofo.25 and the other should have a variance of 1.8. Check the computed means of each sequence (using the mean function previously developed) and compare them with the theoretical mean (calculated in the program). Hint: rearrange the two equations above to write two equations with two unknowns (a, b).

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE