bundles / scipy 1.18.0 / scipy / stats / _multivariate / random_table_frozen / pmf
function
scipy.stats._multivariate:random_table_frozen.pmf
Signature
def pmf(self, x)Summary
Probability of table to occur in the distribution.
Parameters
x: array-likeTwo-dimensional table of non-negative integers, or a multi-dimensional array with the last two dimensions corresponding with the tables.
Returns
pmf: ndarray or scalarProbability mass function evaluated at
x.
Notes
See class definition for a detailed description of parameters.
If row and column marginals of x do not match row and col, zero is returned.
Examples
from scipy.stats import random_table import numpy as np✓
x = [[1, 5, 1], [2, 3, 1]] row = np.sum(x, axis=1) col = np.sum(x, axis=0)✓
random_table.pmf(x, row, col)
✗np.float64(0.19580419580419592)Alternatively, the object may be called (as a function) to fix the row and column vector sums, returning a "frozen" distribution.
d = random_table(row, col)
✓d.pmf(x)
✗np.float64(0.19580419580419592)
Aliases
scipy.stats._multivariate.random_table_frozen.pmf