Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Assume a database with 10,000 elements of data is queried, through a statistical interface, for the average data value. The response is determined using the random-sample query method, with a subset of 500 elements being used. Assuming you had access to all data elements, how could you determine what the least accurate response could be?

share|improve this question

closed as off-topic by bobthechemist, Kuba, RunnyKine, Yves Klett, Sjoerd C. de Vries May 13 at 20:39

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question cannot be answered without additional information. Questions on problems in code must describe the specific problem and include valid code to reproduce it. Any data used for programming examples should be embedded in the question or code to generate the (fake) data must be included." – bobthechemist, RunnyKine
If this question can be reworded to fit the rules in the help center, please edit the question.

3  
This question appears to be off-topic. –  Sektor May 13 at 15:16

1 Answer 1

You can take a sample of random selections and determine the probability of an inaccurate result.

In the example below a 'response' (e.g. mean) of less than -0.0767 or greater than 0.0767 has a small 0.27% chance of occurring.

See: 68–95–99.7 rule

elements = RandomReal[{-1, 1}, 10000];
selections = Table[RandomSample[elements, 500], {10000}];
means = Mean /@ selections;
sd = StandardDeviation[means];
Histogram[means,
 Epilog -> {Line[{{-3 sd, 0}, {-3 sd, 400}}], Line[{{3 sd, 0}, {3 sd, 400}}]}]

enter image description here

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.