function to create a stats table to be placed on figures
summary stat table
corrected
function which creates stat table and makes a plot with the tables
updated to place tables on the figures