I've been trying to adapt the steps given here. how-to-generate-random-variables-then-use-in-calculations-in-pdflatex My MWE is below (and I apologise for the code being a bit clunky!) ...
The followin code gives this error : ! Argument of \pgfmathrnd@@ has an extra }. <inserted text> \par l.12 } ? ! Emergency stop. <inserted text> ...