|
NORMAL.OMS
Script File:
# Description:
# Compares sample and true cumulatives for a normal random variable.
#
clear
# number of points
N = 200
# seed the random simulation
seed(1, 2, 3, 4)
# simulated normal random variate
y = snormal(N, 1)
# sort the values
y = sort(y)
# simulated cumulative distribution
cum = seq(N) / double(N)
#
gtitle("Sample And True Cumulative")
# plot the simulated cumulative distribution
gplot(y, cum)
# plot the true cumulative distribution
gplot(y, cnormal(y))
Output:
|
|