Ask Question
22 July, 00:17

Write a python function average_sample_median (n, P), that return the average of 1000 samples of size n sampled from the distribution P.

* Sample run *

print (average_sample_median (10,[0.2,0.1,0.15,0.15,0.2,0.2])) print (average_sample_median (10,[0.3,0.4,0.3])) print (average_sample_median (10, P=[0.99,0.01])

* Expected Output *

3.7855

2.004

1

+3
Answers (1)
  1. 22 July, 02:52
    0
    Explanation: E (x) = np

    E (x+y) = E (x) + E (y)

    Y:p (y=1) = p

    P (y-0) = 1-p

    I hope you can understand this example if not just tell me and I can Give you more examples thaks:-)
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Write a python function average_sample_median (n, P), that return the average of 1000 samples of size n sampled from the distribution P. * ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers