
16 BASIC DATA ANALYSIS
“generic” function plot() dispatches internally to the special function plot.ecdf, and
this draws the distribution function in its specific way. We can reduce our example by
just calling plot(ecdf( runif(100) )).
Exercise 1.4
Extend the function call plot(ecdf( runif(10) )) using addi-
tional arguments so that the result has the following form:
0.0 0.2 0.4 0.6 0.8 1.0
0.0 0.2 0.4 0.6 0.8 1.0
Empirical distribution function
(X uniform)
x
F
n
((x))
Exercise 1.5 Discrimination and Sample Size
Using norm() you can generate random variables with a Gaussian
distribution. Can you tell a Gaussian distribution from a uniform
distribution ...