File:BetaDistrCDF2.svg

Summary

Description
English: CDF for skewed Beta distribution vs. x and beta= 5 alpha - J. Rodal.
Date
Source Own work
Author Shiyu Ji
Other versions
A raster version of this image is available. It should be used in place of this vector image when superior.
File:BetaDistrCDF2.svgFile:.png

In general, it is better to use a good SVG version.


Category:Bitmap version available
SVG development
InfoField
Source code
InfoField

Python code

# Beta distribution CDF when 5*alpha = beta.
# Idea from Dr. J. Rodal
# Use Inkscape to enlarge and adjust the figure position 
# (degroup, enlarge and regroup the SVG elements etc.).

from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as pl
from matplotlib import cm
import numpy as np
from scipy.special import beta, betainc
import scipy.integrate as integral
# Prepare the data by Ix(a, 5a)
X = np.arange(0.0,  1.0, .02)
A = np.arange(0.0, 10.0, .002)
gridX, gridA = np.meshgrid(X, A)
Z = np.ndarray(shape=gridX.shape, dtype = float)
for i in range(len(X)):
  for j in range(len(A)):
    if A[j] < 0.001: 
      Z[j][i] = betainc(0.001, 0.005, X[i])
    else:  Z[j][i] = betainc(A[j], 5*A[j], X[i])
# Draw the data
fig = pl.figure()
ax = fig.add_subplot(111, projection = '3d')
pl.xticks([0.0, 0.5, 1.0])
pl.yticks([0.0, 5.0, 10.0])
ax.contour(gridX, gridA, Z, zdir='z', offset=0)
ax.plot_surface(gridX, gridA, Z, lw = 0.0)
ax.plot_wireframe(gridX, gridA, Z, lw = 1.0, color = 'black', \
   rstride=1000, cstride=10)
ax.set_xlim([0.0,  1.0])
ax.set_ylim([0.0, 10.0])
ax.set_zlim([0, 1.0])
ax.set_xlabel('x')
ax.set_ylabel('alpha')
ax.set_zlabel('CDF')
ax.view_init(30,250)
fig.savefig('betaDistrCDF2.svg')

Licensing

Shiyu Ji, the copyright holder of this work, hereby publishes 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.
Attribution:
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.
Category:CC-BY-SA-4.0#BetaDistrCDF2.svgCategory:Self-published work
Category:Beta distribution Category:Surface plots
Category:Beta distribution Category:Bitmap version available Category:Bitmap version not available Category:CC-BY-SA-4.0 Category:Self-published work Category:Surface plots Category:Valid SVG created with Matplotlib code