File:Gamma distribution pdf.svg
Original file (SVG file, nominally 800 × 600 pixels, file size: 115 KB)
This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.
Summary
| DescriptionGamma distribution pdf.svg | The probability density function of Gamma distribution for different parameters. See below for the spec and Gnuplot source code. |
| Date | (UTC) |
| Source | |
| Author |
|
Spec and Gnuplot Source Code

For the readers who are interested in Erlang distribution, we have prepared another specific image (see right). Note that in Erlang distribution the shape parameter k must take integers.
Originally, the pdf of Gamma distribution is
Let α = k, and β = 1/θ. Then
Hence
which directly gives the code below.
# Author: Autopilot, Ika
# Date: 12/08/2014
set term svg size 800,600 font 'Times, 24' enhanced
set output 'gamma_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, theta)
# Commonly, we denote a = alpha = k and b = beta = 1/theta.
ln_f(x, a, b) = a*log(b) - lgamma(a) + (a-1)*log(x) - b*x
# f(x; k, theta)
f(x, k, theta) = (x<0)? 0 : (x==0)? ((k<1)? 1/0 : (k==1)? theta : 0)\
: (theta==0)? 0 : exp(ln_f(x, k, 1.0/theta))
plot [0:20] \
f(x, 1.0, 2.0) t "k = 1.0, {/Symbol q} = 2.0" lw 2 lc rgb "red", \
f(x, 2.0, 2.0) t "k = 2.0, {/Symbol q} = 2.0" lw 2 lc rgb "orange", \
f(x, 3.0, 2.0) t "k = 3.0, {/Symbol q} = 2.0" lw 2 lc rgb "yellow", \
f(x, 5.0, 1.0) t "k = 5.0, {/Symbol q} = 1.0" lw 2 lc rgb "green", \
f(x, 9.0, 0.5) t "k = 9.0, {/Symbol q} = 0.5" lw 2 lc rgb "black", \
f(x, 7.5, 1.0) t "k = 7.5, {/Symbol q} = 1.0" lw 2 lc rgb "blue", \
f(x, 0.5, 1.0) t "k = 0.5, {/Symbol q} = 1.0" lw 2 lc rgb "purple"
set term x11
set output
| This is a retouched picture, which means that it has been digitally altered from its original version. Modifications: Recreated as svg with gnuplot. The original can be viewed here: Gamma distribution pdf.png:
|
| This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported licence. | ||
| ||
| This licensing tag was added to this file as part of the GFDL licensing update.http://creativecommons.org/licenses/by-sa/3.0/CC BY-SA 3.0Creative Commons Attribution-Share Alike 3.0truetrue |
| Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation Licence, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the licence is included in the section entitled GNU Free Documentation Licence.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue |
|
This work is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licence as published by the Free Software Foundation; either version 2 of the Licence, or any later version. This work is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See version 2 and version 3 of the GNU General Public Licence for more details.http://www.gnu.org/licenses/gpl.htmlGPLGNU General Public Licensetruetrue |
Original upload log
This image is a derivative work of the following images:
- File:Gamma_distribution_pdf.png licensed with Cc-by-sa-3.0-migrated, GFDL, GPL
Uploaded with derivativeFX
Captions
Items portrayed in this file
depicts
26 June 2010
File history
Click on a date/time to view the file as it appeared at that time.
| Date/Time | Thumbnail | Dimensions | User | Comment | |
|---|---|---|---|---|---|
| current | 04:35, 9 December 2014 | 800 × 600 (115 KB) | wikimediacommons>IkamusumeFan | Change curve colors for better display. |
File usage
The following page uses this file:
Metadata
This file contains additional information, probably added from the digital camera or scanner used to create or digitise it.
If the file has been modified from its original state, some details may not fully reflect the modified file.
| Short title | Gnuplot |
|---|---|
| Image title | Produced by GNUPLOT 4.6 patchlevel 3 |
| Width | 800 |
| Height | 600 |