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

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -