
6.6 Distributions Related to Normal 211
In MATLAB, the CDF and PDF for a χ
2
k
are chi2cdf(x,k) and chi2pdf(x,k),
respectively. The pth quantile of the
χ
2
k
distribution is chi2inv(p,k).
Example 6.7.
χ
2
10
as a Sum of Ten Standard Normals. In this example
we demonstrate by simulation that the sum of squares of standard normal
random variates follows the
χ
2
-distribution. In particular we compare Z
2
1
+
Z
2
2
+···+Z
2
10
with χ
2
10
.
Figure 6.10, produced by the code in
nor2chi2.m, shows a normalized
histogram of the sums of squares of ten standard normals with a superimposed
χ
2
10
density (above) and a Q–Q plot comparing the sorted generated sample
with
χ
2
10
quantiles (below). As expected, the simulated empirical distribution
is very close to the theoretical chi-square distribution.
figure;
subplot(2,1,1)
%form a matrix of standard normals 10 x 10000
%square the entries, sum up columnwise, to
% get a vector of 10000 chi2 with 10 df.
histn(sum(normrnd(0,1,[10, 10000]).^2),0, 1,30)
hold on
plot((0.1:0.1:30), chi2pdf((0.1:0.1:30),10),’r-’,’LineWidth’,2)
axis tight
subplot(2,1,2)
%check the Q-Q plot
xx = sum(normrnd(0,1,[10, 10000]).^2);
tt = 0.5/10000:1/10000:1;
yy = chi2inv(tt,10);
plot(sort(xx), yy,’
*
’)
hold on
plot(yy, yy,’r-’)
Example 6.8. Targeting Meristem Cells. A gene transfer system for meris-
tem cells can be developed on the basis of a ballistic approach (Sautter, 1993).
Instead of a macroprojectile, microtargeting uses the law of Bernoulli for ac-
celeration of highly uniform-sized gold particles. The particle is aimed at an
area as small as 150
µm in diameter, which corresponds to the size of a meris-
tem. Suppose that a particle is fired at a meristem at the origin of a plane
coordinate system, with units in microns. The particle lands at (X ,Y ), where
X and Y are independent and each has a normal distribution with mean
µ =0
and variance
σ
2
=10
2
. The particle is successively delivered if it lands within
p
738 µm of the target (origin). What is the probability of this event? The parti-
cle is successively delivered if X
2
+Y
2
≤738, or (X /10)
2
+(Y /10)
2
≤7.38. Since
both X /10 and Y /10 have a standard normal distribution, random variable
(X /10)
2
+(Y /10)
2
is χ
2
2
-distributed. Since chi2cdf(7.38,2)=0.975, we conclude
that the particle is successfully delivered with a probability of 0.975.