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