bundles / scipy latest / scipy / stats / _multivariate / random_table_gen / pmf
function
scipy.stats._multivariate:random_table_gen.pmf
Signature
def pmf ( self , x , row , col ) 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.
row: array_likeSum of table entries in each row.
col: array_likeSum of table entries in each column.
Returns
pmf: ndarray or scalarProbability mass function evaluated at
x.
Notes
The row and column vectors must be one-dimensional, not empty, and each sum up to the same value. They cannot contain negative or noninteger entries.
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)
✗d = random_table(row, col)
✓d.pmf(x)
✗Aliases
-
scipy.stats._multivariate.random_table_gen.pmf