%
%This function is run by  dd
%
%  Last change:  10/2/2005 - Florian Knorn

function p = er_reg_model(param,k)

global Nm1 binom;

if binom% binomial distribution approximation
	% param = p
	p = binomial(Nm1,k) .* param.^k .* (1-param).^(Nm1-k);
else
	% param = <k>
	for i=1:length(k)
		p(i) =  exp(-param) * param^k(i)/ factorial(k(i));
	end
end