I wrote this short code

r = RandomReal[NormalDistribution[15, 1], 10000];
N[Mean[r], 3]
N[StandardDeviation[r], 3]
N[(StandardDeviation[r]/Sqrt[10000]), 3]

My problem is, the function N is returning me the correct amount o significant digits i want.


marked as duplicate by Szabolcs, Thies Heidecke, Johu, Community Sep 28 '18 at 21:03

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ You want Round[] for this. RandomReal[] already returns machine precision results, so any alteration by N[] will not work. $\endgroup$ – J. M. is away Sep 28 '18 at 19:04

Browse other questions tagged or ask your own question.