Reference no: EM132235152
Statistical Software and Data Analysis Assignment -
1. A consumer magazine wants to create an index of cars based on the data in the file cars.dat. This index is a function of the car size, gas mileage (mileage), and reliability (reliable). The variable size has values SMALL, COMPACT, and MID-SIZED. The cars.dat data file description is as follows.
Variable
|
Description
|
Starting Column
|
Length
|
Type
|
SIZE
|
Car Size
|
1
|
9
|
Char
|
MANUFACT
|
Manufacturer
|
11
|
9
|
Char
|
MODEL
|
Model
|
22
|
9
|
Char
|
MILEAGE
|
Gas Mileage
|
38
|
2
|
Numeric
|
RELIABLE
|
Reliability
|
50
|
1
|
Numeric
|
Write a SAS DATA step to create a SAS dataset called car_inx that contains all the variables described in the cars.dat file plus the index variable. Be sure to set index to a missing value if either a mileage or reliability value is missing. The rules are as follows:
For SMALL cars:
Mileage
|
Reliability
|
Index
|
0 TO 20
|
1 TO 3
|
1
|
0 TO 20
|
4 TO 5
|
2
|
21 TO 50
|
1 TO 3
|
3
|
21 TO 50
|
4 TO 5
|
4
|
For COMPACT cars:
Mileage
|
Reliability
|
Index
|
0 TO 15
|
1 TO 3
|
1
|
0 TO 15
|
4 TO 5
|
2
|
16 TO 50
|
1 TO 3
|
3
|
16 TO 50
|
4 TO 5
|
4
|
For MID-SIZED cars:
Mileage
|
Reliability
|
Index
|
0 TO 12
|
1 TO 3
|
1
|
0 TO 12
|
4 TO 5
|
2
|
13 TO 50
|
1 TO 3
|
3
|
13 TO 50
|
4 TO 5
|
4
|
2. An Excel file named 'students' of the scores from the last semester for a statistics course is given. The following is a guideline for the overall final grade and the final exam score is out of 150 points, which means it should be recalculated to out of 100 points first. For example, if a student got 120 points on final exam, the actual score should be (120/150)*100=80 points.
Exam #1 (out of 100 points)
|
20%
|
Exam #2 (out of 100 points)
|
20%
|
Final Exam (out of 150 points)
|
30%
|
Quiz #1- Quiz #5 (out of 10, respectively)
|
15%
|
HW #1 - HW #2 (out of 50, respectively)
|
15%
|
Total
|
100%
|
Note that the final grade is assigned as follows: A for 90-100%; B for 80-89%; C for 70-79%; D for 60-69%; F for 59% or under.
(1) Report the average of homework and quiz scores (unit: percent) for each student.
(2) Report the total exam scores (= exam_1+exam_2+Final) for each student.
(3) Calculate the overall final score for each student.
(4) Create a new data set called 'grade_A' and print out the overall final score for A-Grade students only.
(5) Print the student identification number, the overall final score, and the final grade only.
3. Write a SAS program to give PDF (probability density function) and CDF (cumulative distribution function) of a binomial distribution with n = 10 and p = 0.1.
4. Write a SAS program to create a SAS dataset BIG which has 100 observations of X=INT(RANUNI(0)*100 +1). Print X values only from the dataset BIG.
Attachment:- Assignment Files.rar