generate table and plot

probability, p: