{ } Raw JSON

bundles / scipy 1.17.1 / scipy / stats / _multivariate / multinomial_gen / pmf

function

scipy.stats._multivariate:multinomial_gen.pmf

source: /scipy/stats/_multivariate.py :4099

Signature

def   pmf ( self x n p )

Summary

Multinomial probability mass function.

Parameters

x : array_like

Quantiles, with the last axis of x denoting the components.

n : int

Number of trials

p : array_like

Probability of a trial falling into each category; should sum to 1

Returns

pmf : ndarray or scalar

Probability density function evaluated at x

Notes

n should be a nonnegative integer. Each element of p should be in the interval and the elements should sum to 1. If they do not sum to 1, the last element of the p array is not used and is replaced with the remaining probability left over from the earlier elements.

Aliases

  • scipy.stats._multivariate.multinomial_gen.pmf