numpy - python - mapping values from a probability mass function to a list of random variables -
numpy - python - mapping values from a probability mass function to a list of random variables -
let's have list of random variables, , utilize histogram function this:
import numpy np x = [np.random.randn() in range(2**10)] vals, bin_edges = np.histogram(x, 100)
1) how efficiently normalize histogram become list representations of probability mass function?
2) how map probability mass function new list in such way end list value @ i
corresponds probability of observing x[i]
?
python numpy statistics
Comments
Post a Comment