Ask Question
13 March, 09:09

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

+5
Answers (1)
  1. 13 March, 09:16
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers