DOTNB_Matlab includes the Matlab Code function files to calculate the PDF, CDF, mean, variance and simulation for the variable generated from the Difference Of Two Negative Binomial distributions (DOTNB).   
PDF: Probability Density Function  
CDF: Cumulative Density Function

Test_DOTNB.m contains an example to simulate 30000 numbers following DOTNB distribution, calculate the theoretical distribution, then plot the histgraph of simulated numbers and the theoretical pdf function.

