Home > freetb4matlab > statistics > binostat.m

binostat

PURPOSE ^

% Compute mean and variance of the binomial distribution.

SYNOPSIS ^

function [m, v] = binostat (n, p)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {[@var{m}, @var{v}] =} binostat (@var{n}, @var{p})
% Compute mean and variance of the binomial distribution.
%
% @subheading Arguments
%
% @itemize @bullet
% @item
% @var{n} is the first parameter of the binomial distribution. The elements
% of @var{n} must be natural numbers
%
% @item
% @var{p} is the second parameter of the binomial distribution. The
% elements of @var{p} must be probabilities
% @end itemize
% @var{n} and @var{p} must be of common size or one of them must be scalar
%
% @subheading Return values
%
% @itemize @bullet
% @item
% @var{m} is the mean of the binomial distribution
%
% @item
% @var{v} is the variance of the binomial distribution
% @end itemize
%
% @subheading Examples
%
% @example
% @group
% n = 1:6;
% p = 0:0.2:1;
% [m, v] = binostat (n, p)
% @end group
%
% @group
% [m, v] = binostat (n, 0.5)
% @end group
% @end example
%
% @subheading References
%
% @enumerate
% @item
% Wendy L. Martinez and Angel R. Martinez. @cite{Computational Statistics
% Handbook with MATLAB}. Appendix E, pages 547-557, Chapman & Hall/CRC,
% 2001.
%
% @item
% Athanasios Papoulis. @cite{Probability, Random Variables, and Stochastic
% Processes}. McGraw-Hill, New York, second edition, 1984.
% @end enumerate
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sat 16-May-2009 00:04:49 by m2html © 2003