# set terminal png transparent nocrop enhanced font arial 8 size 420,320 # set output 'prob2.8.png' set format x "%2.0f" set format y "%3.2f" set key right top Right noreverse noinvert enhanced box linetype -1 linewidth 1.000 samplen 4 spacing 1 width 0 height 0 autotitles set label 1 "mu" at 6.33333, 0.0170962, 0 left norotate back nopoint set label 2 "sigma" at 9.31476, 0.0578888, 0 left norotate back nopoint set arrow 1 from 5.83333, 0, 0 to 5.83333, 0.13038, 0 nohead back nofilled linetype 1 linewidth 1.000 set arrow 2 from 5.83333, 0.0578888, 0 to 8.81476, 0.0578888, 0 nohead back nofilled linetype 1 linewidth 1.000 set samples 200, 200 set xtics border mirror norotate 0.499000,2,17.0000 set ytics border mirror norotate 0.00000,0.0170962,0.170962 set title "negative binomial PDF using gamma approximation" 0.000000,0.000000 font "" set xlabel "k, x ->" 0.000000,0.000000 font "" set xrange [ -1.00000 : 18.0000 ] noreverse nowriteback set ylabel "probability density ->" 0.000000,0.000000 font "" set yrange [ 0.00000 : 0.170962 ] noreverse nowriteback Binv(p,q)=exp(lgamma(p+q)-lgamma(p)-lgamma(q)) arcsin(x)=invpi/sqrt(r*r-x*x) beta(x)=Binv(p,q)*x**(p-1.0)*(1.0-x)**(q-1.0) bin_s(x)=n!/(n-int(x))!/int(x)!*p**int(x)*(1.0-p)**(n-int(x)) bin_l(x)=exp(lgamma(n+1)-lgamma(n-int(x)+1)-lgamma(int(x)+1)+int(x)*log(p)+(n-int(x))*log(1.0-p)) binom(x)=(n<20)?bin_s(x):bin_l(x) cauchy(x)=b/(pi*(b*b+(x-a)**2)) chi(x)=exp((0.5*df1-1.0)*log(x)-0.5*x-lgamma(0.5*df1)-df1*0.5*log2) erlang(x)=lambda**n/(n-1)!*x**(n-1)*exp(-lambda*x) extreme(x)=alpha*(exp(-alpha*(x-u)-exp(-alpha*(x-u)))) f(x)=Binv(0.5*df1,0.5*df2)*(df1/df2)**(0.5*df1)*x**(0.5*df1-1.0)/(1.0+df1/df2*x)**(0.5*(df1+df2)) g(x)=exp(rho*log(lambda)+(rho-1.0)*log(x)-lgamma(rho)-lambda*x) geometric(x)=exp(log(p)+int(x)*log(1.0-p)) halfnormal(x)=sqrt2invpi/sigma*exp(-0.5*(x/sigma)**2) hypgeo(x)=(int(x)>mm||int(x)