logo

SEMESTER 1 – END OF SEMESTER TEST 2019

   

Added on  2022-11-26

17 Pages2392 Words292 Views
 | 
 | 
 | 
School of Science
SEMESTER 1 END OF SEMESTER TEST 2019
Math 1322 – Introduction to Statistical
Computing
Date: Monday, 27 May 2019 Time Allowed: 2 hours + 15
minutes reading
Time: 6:45 pm - 9:00 pm No. of pages: 9 pages
INSTRUCTIONS:
1. Candidates should answer all six (6) questions. This paper is worth a total
of 40 marks and contributes 40% of your final grade.
2. Candidates may take lecture notes, assignments and printed or written
material into the test. They may access the internet but must not open
message/mail facilities of any kind.
3. Reading time of 15 minutes is included. You can download the files during
this time, but no other computing should be done during reading time.
4. At the end of each question paste your SAS code into this document in the
box provided.
5. The data sets needed are on Canvas under Assignments on the Test 2
Page. Save the files to your own drive before carrying out any analyses.
An electronic version of this paper to be used for all of your answers and
output where requested. This paper (MATH1322_Test_2_2019) is
available on Canvas as part of Test 2 for you to download.
6. At the completion of the exam you MUST upload to Canvas, your
electronic version of:
i. your answers in this Word document (including SAS code used).
ii. your SAS code file (ONE file only)
A window of 10 minutes is available at the completion of the test to
upload your submission files. No further work is permitted during
this upload time or you will receive a zero grade. Any submissions
after this time will not be considered and will receive zero.
SEMESTER 1 – END OF SEMESTER TEST 2019_1

SAVE ALL OF YOUR WORK AS YOU GO
SEMESTER 1 – END OF SEMESTER TEST 2019_2

QUESTION 1
The file Chips.csv on Canvas contains information on product sales. Use this file
to answer the following questions.
a) Read the information into SAS using a DATA step.
b) Using one SAS procedure, produce a detailed summary of the quantity
sold, including a normal distribution plot.
c) Using SAS code, create a new variable to show the month of Sale, and
label your column “Month”.
d) Create a table of just the records of the chips sold in December.
e) Produce a histogram to show the quantity sold in December using your
table from part d). Include below.
(2+1.5+1.5+1+1 = 7 marks)
Question 1 Answers and SAS Code
%let path=/folders/myfolders/Sample Data;
libname analysis "&path";
DATA analysis.chipdata;
infile "&path/chips.csv"
delimiter=','
firstobs=2
missover
DSD;
informat Date Date9.;
format Date Date9.;
input QtySold Price Advertised Holiday Date Product$;
run;
proc contents data=analysis.chipdata;
run;
proc means data=analysis.chipdata;
var QtySold;
run;
proc univariate data=analysis.chipdata;
var QtySold;
histogram/normal;
run;
SEMESTER 1 – END OF SEMESTER TEST 2019_3

Data analysis.chipdata1;
set analysis.chipdata;
Month=month(Date);
run;
Data chipdec;
set analysis.chipdata1;
if Month=12;
run;
proc univariate data=chipdec;
var QtySold;
histogram;
run;
SEMESTER 1 – END OF SEMESTER TEST 2019_4

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents