# Environment for creative processing of text and numerical data

## Bivariate normal distribution

S.Mustonen (1990)

### Edit field:

```   1 *SAVE BINORM / Plotting a sample from a bivariate normal distribution
3 *Working with simulated data:
4 *
5 *`FILE CREATE BINORM,8,2`
6 *FIELDS:
7 *1 N 4 X
8 *2 N 4 Y
9 *END
10 *Initialize the data file for 1000 observations:
11 *`FILE INIT BINORM,1000`
12 *
13 *`VAR X,Y TO BINORM` / compute values of variables
14 *X=probit(rnd(0))   Seed number of rnd(0) is time-dependent.
15 *Y=X+probit(rnd(0))
16 *.......................................................................
17 *
18 *`PLOT BINORM,X,Y`
20 *PEN=[Swiss(10)][BLACK]  LINETYPE=[line_width(1)][BLACK]
21 *XSCALE=-4(1)4 YSCALE=-6(2)6
22 *CONTOUR=[color(0,0,0,0)][line_width(1)],0.5,0.9,0.99
23 *SIZE=1700,1700 XDIV=150,1400,150 YDIV=150,1400,150
24 *POINT=[YELLOW],0
25 *FRAMES=F1,F2
26 *F1=0,0,1700,1700,-1
27 *[FILL-1]=0.2,0,0,0
28 *F2=150,150,1400,1400,-2
29 *[FILL-2]=1,1,0,0
30 *HOME=200,500
31 *DEVICE=PS,BINORM.PS
32 *.......................................................................
33 *Assessing normality of X by plotting a histogram:
35 *PEN=[Swiss(10)][BLACK]  LINETYPE=[line_width(1)][BLACK]
36 *`HISTO BINORM,X`
37 *X=-4(0.2)4 XSCALE=-4(1)4 FIT=[WHITE][line_width(1)],Normal
38 *HOME=200,500   YSCALE=0(20)100
39 *DEVICE=PS,BINORM2.PS
40 *FILL=-3 [FILL-3]=0,0,1,0
41 *SIZE=1700,700  XDIV=150,1400,150 YDIV=150,400,150
42 *FRAMES=F1,F2
43 *F1=0,0,1700,700,-1
44 *[FILL-1]=0.2,0,0,0
45 *F2=150,150,1400,400,-2
46 *[FILL-2]=1,1,0,0
47 *.......................................................................
48 *
49 *`PRINT CUR+1,E`
50 - [left_margin(10)][line_spacing(12)][copies(1)]
51 & 42
52 - picture BINORM.PS,*,*
53 & 17
54 - picture BINORM2.PS,*,*
55 E
56 *
57 *
```