The task is to numerically estimate an integral. Here is the setting: suppose
is a bounded real-valued function,
, defined on the unit interval
. You are not told anything more about the function
explicitly but you have access to a friendly oracle: if you prompt her with any given value
, she will loop up the function value
and whisper it to you. Your task is to estimate the value
. \newlineSelect
independently at random from the uniform distribution on the unit interval, obtain the values
from your friendly oracle, and boldly evaluate and proffer the value
as your estimate of
. A common, garden variety laptop can compute your estimate
in a fraction of a second if
but is it any good? In defence of your starting procedure, with
, estimate
, the probability that your estimate makes an error of more than one percent. [Hint: if
Uniform[0,1], stare at the expression for
]
, όπου
είναι μια φραγμένη πραγματική συνάρτηση, και
ορισμένη στο διάστημα μονάδας
.
. Θα επιλέξουμε τυχαία
από μια ομοιόμορφη κατανομή στο διάστημα μονάδας και θα λάβουμε τις τιμές
ως:
είναι το ολοκλήρωμα της 
μπορεί να υπολογιστεί ως:
, που σημαίνει
. Έτσι:
είναι η τετραγωνική ρίζα της διακύμανσης:
.

, μπορούμε να υπολογίσουμε την πιθανότητα σφάλματος.