File:Erlang dist pdf.svg

Uploaded by IkamusumeFan
Upload date 2014-12-08T23:30:45Z
MIME type image/svg+xml
Dimensions 800 × 600 px
File size 114.9 KB

Summary

Description
English: The probability density function of Erlang distribution.
Date
Source Own work
Author IkamusumeFan
Other versions

Gnuplot Source Code

 This W3C-unspecified plot was created with Gnuplot.
# Author: Autopilot, Ika
# Date: 12/08/2014

set term svg size 800,600 font 'Times, 24' enhanced
set output 'erlang_dist_pdf.svg'
set samples 1001

set xtics 0,2
set ytics 0,0.1
set mxtics 10
set mytics 10
set yrange [0:0.5]
set key top right Left reverse

# Ln f(x; k, mu)
# Commonly, we denote a = alpha = k and b = beta = 1/mu.
ln_f(x, a, b) = a*log(b) - lgamma(a) + (a-1)*log(x) - b*x

# f(x; k, mu)
f(x, k, mu) = (x<0)? 0 : (x==0)? ((k<1)? 1/0 : (k==1)? mu : 0)\
 : (mu==0)? 0 : exp(ln_f(x, k, 1.0/mu))

plot [0:20] \
    f(x, 1.0, 2.0) t "k = 1, {/Symbol m} = 2.0" lw 2 lc rgb "red", \
    f(x, 2.0, 2.0) t "k = 2, {/Symbol m} = 2.0" lw 2 lc rgb "orange", \
    f(x, 3.0, 2.0) t "k = 3, {/Symbol m} = 2.0" lw 2 lc rgb "yellow", \
    f(x, 5.0, 1.0) t "k = 5, {/Symbol m} = 1.0" lw 2 lc rgb "green", \
    f(x, 7.0, 0.5) t "k = 7, {/Symbol m} = 0.5" lw 2 lc rgb "black", \
	f(x, 9.0, 1.0) t "k = 9, {/Symbol m} = 1.0" lw 2 lc rgb "blue", \
	f(x, 1.0, 1.0) t "k = 1, {/Symbol m} = 1.0" lw 2 lc rgb "purple"

set term x11
set output

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

8 December 2014

117,646 byte

image/svg+xml

22ee41f6cf9031ec040b554dd1e136034f21f588