Kafai HW 2
1. Study Proc Tabulate and other presentation Procs
2. Input the following data into a data set called simpson
Kafai Final 1
Due 12/20/2010 (Before noon)
Describe with full sentences and in a concise manner all the topics you have learned (covered) in
Math 338 this semester.
Input statement in a SAS data step:
Input statement is us
Kafai HW 1
1. Write a SAS program called HW1.sas to create a permanent SAS data file using StateData.txt
data file with the following variables:
State, Region, Visits, Salesman, Sale, Expenses
Use comments and titles
Kafai HW 6
Data set EMPLOY contains:
ID (employee number),
DOB (date of birth).
Data set PARTS contains:
Data set SALES contains:
ID (employee number),
TRANS (transaction number),
Kafai HW 3
1. Generate 225 samples of size 10000 random numbers from U(0, 1). For each of these 225
samples calculate the mean.
Find the simulated probability that the mean is between 0.49 and 0.50 inclus
libname datain 'D:\MATH 338\DATA';
length state $35.0 region $ 10.0;
infile 'D:\MATH 338\DATA\statedata.txt';
input state $& region $visits salesman sale expenses;
label state='State Name'
Introduction to SAS
Dr. Mohammad R. Kafai
10:00 - 11:00 MWF and by appointment
Text Book: SAS Application Programming by Frank C. DiIorio and online SAS manual
Grade is based
Kafai HW 11
Import the file HW11.xls. The variables in this file are:
Students First Name
Students Last Name
Q1 Q9 (Quizzes 10 points each) Drop the lowest two and calculate a percentage
H1 H14 (Homework 10 points ea
Kafai HW 8
A survey is conducted and data are collected and coded. The data layout is shown below:
Did you vote in the
Do you agree with
Kafai HW 7
We have three data sets, ONE, TWO, and THREE. Each data set contains the variables:
ID (IDNUM in data set TWO)
In addition, data set TWO contains TAXRATE and WITHHOLD; data set THREE contain
Kafai HW 5
A one unit stick is broken randomly into two pieces.
1) Find E (the short piece divided by the long piece).
2) Find E (the long piece divided by the short piece).
Kafai HW 4
Suppose Xi for i=1, 2, 3 has uniform (0, 1) distribution.
1. Let M = min (n: X1 + X2 + + Xn> 1). Find E (M) by simulation.
2. Let N = min (n: Xn > Xn+1). Find E (N) by simulation.
do j=1 to 225;
do i = 1 to 625;
u = rand("Uniform");