lab4 - entering raw data consisting only of one variable...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
STA511 LAB #4 This lab provides some exposure to using the SAS arithmetic functions, as well as creating numeric and character variables. The Normal Distribution is the most widely-used probability distribution in statistics. In this example, we will use this distribution to practice entering formulas in SAS. A. The Normal Distribution has the formula: 2 2 2 ) ( 2 1 σ μ π - - = x e Y Write down on a piece of paper a plan as to how you will enter this formula in SAS. In other words, create a new variable called Y: Y = [ENTER YOUR FORMULA HERE] Sigma, mu, and pi will be created by using a variable assignment of a constant number. For example you will use the SAS statement: SIGMA = 1; If you wish to input a value of one for sigma. You will create a variety of values for X in Part B. Later, we will put this formula directly in your SAS program and plug in different numbers for these variables. B. Create a temporary data set by
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: entering raw data consisting only of one variable (X). Let this data set have 40 observations, starting at -5 and increasing by 0.25 until reaching +5. Later, we will learn a shortcut way to do this, but, for now, just enter the data manually:-5 -4.75-4.5 . . . 4.75 5 ; C. Now, go back before your data was entered in your DATA step and in two statements, create constant values for SIGMA and MU. Let SIGMA=2 and MU=1. Also, in the same manner, create a new character variable called ITERATION which will always equal 'FIRST'. D. Run a PROC PRINT to check your data set. E. Now, enter the formula you designed in PART A after your assignment statements that you created in PART C. F. Run PROC PLOT or PROC GPLOT with X as your X-axis and Y as your Y-axis. Does the plot look as you expected? G. Go back and try entering different values of MU and SIGMA. What happens to your plot?...
View Full Document

Page1 / 2

lab4 - entering raw data consisting only of one variable...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online