Graphics Reference
In-Depth Information
thought of as producing a long list of random zeroes and ones, each equally likely,
and we've simply grabbed a couple of these.
Together, these two samples are therefore independent, and, because they
came from the same distribution, identically distributed. Such random variables
occur often, and we refer to them as independent identically distributed or iid
random variables or samples.
30.3.4 Continuum Probability
The entire discrete-probability framework can be extended by analogy to count-
ably infinite sets, which requires some care because we have to talk about sums
of infinite series, and worry about convergence. That particular case isn't of much
interest in graphics, but the study of probability on uncountably infinite domains
like the unit interval, or the unit sphere, comes up repeatedly. We'll refer to such a
domain, on which you know how to compute integrals, as a continuum, and speak
of continuum probability as contrasted with the discrete probability discussed
earlier. Some topics use the term continuous probability for this situation, but
since we'll want to be able to discuss continuous and discontinuous functions, we
prefer “continuum.” In the continuum case, we'll analyze programs that contain
rand (which returns random real numbers between 0 and 1, with every number
being just as likely as every other number) rather than randb . There are three
difficulties.
1. The procedure rand doesn't really produce real numbers in [ 0, 1 ] ;itpro-
duces floating-point representations of a tiny subset of them.
2. Certain aspects of the analysis involve mathematical subtleties like
measurability.
3. Our probability space will now be infinite, and we'll need to talk about
probability density rather than probability mass.
We'll mostly ignore difficulties 1 and 2, on the grounds that they have little impact
in the practical applications we make. Difficulty 3, however, matters quite a lot.
Let's look at another sample program as motivation. To make the code as
readable as possible, we'll avoid the use of rand and instead write uniform(a, b)
to indicate a procedure that produces a random real number between a and b ,
with each output being equally probable. This is typically implemented with a+
(b-a) * rand() .
1
2
3
u = un i form(0,1); // a random real between 0 and 1
w = u
return w
On the next several pages, we'll describe the sample space associated with this
program, the notion of probability density, and the definitions of random variable
and expected value, and will eventually compute the expected value of w .
First, for this continuum situation, a probability space is a pair ( S , p ) consist-
ing of a set S , such as the real line, the unit interval, the unit square, the upper
hemisphere, the whole sphere, etc., on which integration is defined, and a prob-
ability density function, or just density p : S
S
p
R (see Figure 30.6), with two
properties:
Figure 30.6: The continuum S has
a density function p assigning a
density to each point of S.
• Non-negativity: For all s
S , p ( s )
0
• Normality: S p = 1
 
 
 
Search WWH ::




Custom Search