Stat Wk 5. Random number generation. Special variables in data steps. Setting labels.

Size: px
Start display at page:

Download "Stat Wk 5. Random number generation. Special variables in data steps. Setting labels."

Transcription

1 Stat Wk 5 Random number generation. Special variables in data steps. Setting labels. Do loops and data step behaviour. Example questions for the midterm. Stat 342 Notes. Week 3, Page 1 / 38

2 Random number generation The most common functions to generate random numbers from are the uniform and the normal distribution. This is done with the RAND() function inside a data step, specifying a distribution, and parameters if necessary. RAND('UNIFORM') will provide a random value from 0 to 1. RAND('NORMAL') will provide a random value from the standard normal distribution (mean = 0, sd = 1). Stat 342 Notes. Week 3, Page 2 / 38

3 Why use random number generation? 1) Sampling. If you had a large dataset of every cellphone number in Vancouver, and you wanted to get the opinion of 1000 randomly selected people. That random selection is done with random number generation. You may want to......weight your sample to account for certain demographics not answering their phones....give the possible responses to a multiple choice question in a randomly selected order. Stat 342 Notes. Week 3, Page 3 / 38

4 Why use random number generation? 2) Goodness of fit testing. If you wanted to find out how a certain set of data would behave if it followed a hypothesized distribution, you could generate values from that distribution and explore that hypothetical situation. You could see how good that distribution fits your data by comparing hypothetical data to real data. That's one way to assess goodness of fit. Stat 342 Notes. Week 3, Page 4 / 38

5 Why use random number generation? 3) Making data anonymous. (1/2) If you are going to be sharing a dataset with other researchers or the public, you have an obligation to protect the privacy of any people whose data is recorded. Sometimes private data like phone numbers or addresses is used to identify people in a data set. For example, in a record of sales, where one row is one sale, you might see the same phone number in multiple rows. Stat 342 Notes. Week 3, Page 5 / 38

6 3) Making data anonymous. (2/2) If that's the case, you would be destroying useful information by getting rid of the phone number variable. What you can do, however, is scramble the phone numbers. They would need to be scrambled in such a way that the same number gets scrambled the same way every time. That way, someone else could read the data after it has been scrambled and still see when one person has made many purchases. They cannot, however, call that person. Stat 342 Notes. Week 3, Page 6 / 38

7 Random Number Generation: Seeds Computers cannot (typically) generate true random numbers. Instead, they use a complicated formula based on a starting value that has to be provided by an outside source. When you use a random number function like UNIFORM(x), The value x is the starting value, or seed, that is used. Stat 342 Notes. Week 3, Page 7 / 38

8 In SAS, by default the computer will use the time of its internal clock as its seed. If you specify a positive integer like 345 in the streaminit() routine with call streaminit(345) Then that value '345' will be used as the first seed. When a random number is generated, a new seed based on '345' will be used. Stat 342 Notes. Week 3, Page 8 / 38

9 Why care about the seed? If the clock-based seed is used, there is no way to retrieve a seed and use it again. Every time you run an analysis on a time-based seed you will get a different result. If you want to generate random numbers, but you want to generate the same random numbers every time you run an analysis that includes setting a fixed seed, it will give the same result every time. Stat 342 Notes. Week 3, Page 9 / 38

10 Here is an example program that sets a fixed seed and generates 10 random numbers from the Cauchy distrubtion. data random; call streaminit(123); do i=1 to 10; x1=rand('cauchy'); output; end; run; Stat 342 Notes. Week 3, Page 10 / 38

11 The same 10 Cauchy values will be found every time. Now try after you remove call streaminit(123); Stat 342 Notes. Week 3, Page 11 / 38

12 SAS can generate random numbers from a wide variety of distributions and parameters sets. RAND('NORMAL', 5,3) will give you a random normal (aka Gaussian) number from a distribution with mean 5 and standard deviation 3. RAND('POISSON', 10) will provide a random number from a Poisson distribution with lambda (mean, variance) of 10. From SAS Documentation on the RAND function Stat 342 Notes. Week 3, Page 12 / 38

13 Stat 342 Notes. Week 3, Page 13 / 38

14 Live example of random number generation. data auto; call streaminit(123); do i=1 to 10; rep78 = RAND('POISSON', 10); mpg = RAND('NORMAL',5,3); foreign = RAND('BERNOULLI',0.5); output; end; run; Stat 342 Notes. Week 3, Page 14 / 38

15 In the random number generator example (consider these practice midterm problems) 1) What happens if you put the seed initialization (call streaminit() ), inside the do-loop? 2) What happens if you get rid of the seed initialization? 3) What could you do to drop the counter i? Stat 342 Notes. Week 3, Page 15 / 38

16 Special Variables There are a few variables that are present in every SAS data step that you can use. These are typically for debugging data steps. _n_, which tracks the number of iterations (rows) that the data step has gone through already. _error_, which is 1 if there was an error processing a row, and 0 otherwise. Stat 342 Notes. Week 3, Page 16 / 38

17 Stat 342 Notes. Week 3, Page 17 / 38 Special Variables example on paper.

18 Something strange happens when you run a do loop AND include a dataset. Try this: data auto_test; set auto; old_i = i; do i=1 to 5; what = RAND('NORMAL'); output; end; run; Stat 342 Notes. Week 3, Page 18 / 38

19 This 'data AND set' code highlights a few things about how data sets work. - By default, a data step only runs for a single iteration. - If there is/are dataset(s) mentioned in the set command, the data step will run one time for each row in each dataset. - ALL the processing of a data step (other than set) is done EVERY time the data step runs. If there are multiple times 'output' is run, then you get multiple rows per data step run. Stat 342 Notes. Week 3, Page 19 / 38

20 What would the variable 'test' look like in this data? data auto_midterm; set auto; keep i what test; test = _n_; do i=1 to 5; what = RAND('NORMAL'); output; end; run; Stat 342 Notes. Week 3, Page 20 / 38

21 What would the variables err_before and err_after look like in this data? data auto_midterm2; set auto; keep i z sq_z err_before err_after; err_before = _error_; do i=1 to 5; z = RAND('NORMAL'); sq_z = sqrt(z); err_after = _error_; output; end; run; Stat 342 Notes. Week 3, Page 21 / 38

22 These two variables behave in very specific ways. _n_ increments when there's a new cycle in data step, NOT when a row is added to the output dataset. _error_ is reset to zero at beginning a new data iteration. It also does not increase beyond 1 even if there are multiple errors during a data step. Not all errors cause a data step to crash. Numerical ones like trying to divide by zero, or taking a square root of the Stat 342 Notes. Week 3, Page 22 / 38

23 variable just get marked by _error_, and the data step continues without issue. Try changing these variables directly in the code of a data step and observe what happens. Stat 342 Notes. Week 3, Page 23 / 38

24 The label command allows you to assign 'labels' to variables. These do NOT change the names of the variables. They assign a new property to each variable. In SAS, each variable has a blank label by default. These labels do not have the same restrictions as variable names, and can even be entire sentences. Stat 342 Notes. Week 3, Page 24 / 38

25 Labels are only retained properly when datasets are saved as a SAS or JMP specific variable. If data is exported into a format for another program, the labels are either not retained, or may not be retained in a way that makes sense. For example, the.csv format has no space for variable labels. At best an extra row can be inserted above variable names for labels. Stat 342 Notes. Week 3, Page 25 / 38

26 Labels show in the results from proc contents along side the format of each variable. Labels example. DATA auto2; RUN; SET auto; LABEL rep78 ="1978 Repair Record" mpg ="Miles Per Gallon" foreign="where Car Was Made"; PROC CONTENTS DATA=auto2; RUN; Stat 342 Notes. Week 3, Page 26 / 38

27 Possible midterm problems, continued. 4) Given <sas code> comment each line and briefly explain what it does. Where <sas code> could include - data sets with sets, labels, random number generation, summary variables, and retain. - proc print, proc content, proc import/export with dbms - proc sql with select, which, order by, and group by. Stat 342 Notes. Week 3, Page 27 / 38

28 Example 1 of code to explain. proc import datafile="mtcars.csv" out=mtcars dbms=csv; delimiter=','; getnames=yes; run; Stat 342 Notes. Week 3, Page 28 / 38

29 Example 2 of code to explain. DATA times2 ; SET times ; avg = MEAN(trial1, trial2, trial3); sd = SD(trial1, trial2, trial3); Ntrials = N(trial1, trial2, trial3); RUN; Stat 342 Notes. Week 3, Page 29 / 38

30 5) Write simple SAS code from scratch to do a certain task. Typical tasks will involve getting the variable names and labels (proc contents), showing the data set or the first few rows (proc print), and very simple sql. Stat 342 Notes. Week 3, Page 30 / 38

31 Examples of code to write from scratch. Find the variable names, formats, and labels of auto2 PROC CONTENTS DATA=auto2; RUN; Stat 342 Notes. Week 3, Page 31 / 38

32 Show the top 10 rows of the variables 'first' and 'second' from the dataset ds. proc print data=ds (obs=10); var first second; run; Stat 342 Notes. Week 3, Page 32 / 38

33 Show every row of the variables time1, time2, time3, all the way up to time20. proc print data=ds; var time1-time20; run; Stat 342 Notes. Week 3, Page 33 / 38

34 Make a table of the largest country in terms of the variable 'area' in dataset 'world' by continent with an SQL query. proc sql; select country, max(area) as biggest_area from world group by continent; Stat 342 Notes. Week 3, Page 34 / 38

35 Example code from chapters 1 and 2 of 'SAS and R' text, the SQL code given in the lecture, and the scanned pages from the 'Data Step' book are all fair game for this midterm. You are allowed to bring a single sided A4 size aid sheet into this exam, as long as it is written by hand and does NOT include photocopies. This should make the 'explain code' portion less of a memorization task. Stat 342 Notes. Week 3, Page 35 / 38

36 Other possible problems 5) Given this SQL table, and this select statement, what will the output be? For this, I highly recommend you look over the lab notes from weeks 3 and 4, which are SQL heavy. An SQL table will be provided, like the Motor Trend cars (mtcars.docx) dataset. Stat 342 Notes. Week 3, Page 36 / 38

37 Example 1 of SQL code to provide a table for PROC SQL; select model, mpg as mileage, cyl as cylinders from mtcars where disp < 100; Stat 342 Notes. Week 3, Page 37 / 38

38 Example 2 of SQL code to provide a table for PROC SQL; select model, hp, am from mtcars where hp == 110 group by am; Stat 342 Notes. Week 3, Page 38 / 38

Biostatistics & SAS programming. Kevin Zhang

Biostatistics & SAS programming. Kevin Zhang Biostatistics & SAS programming Kevin Zhang February 27, 2017 Random variables and distributions 1 Data analysis Simulation study Apply existing methodologies to your collected samples, with the hope to

More information

Reproducibly Random Values William Garner, Gilead Sciences, Inc., Foster City, CA Ting Bai, Gilead Sciences, Inc., Foster City, CA

Reproducibly Random Values William Garner, Gilead Sciences, Inc., Foster City, CA Ting Bai, Gilead Sciences, Inc., Foster City, CA ABSTRACT PharmaSUG 2015 - Paper QT24 Reproducibly Random Values William Garner, Gilead Sciences, Inc., Foster City, CA Ting Bai, Gilead Sciences, Inc., Foster City, CA For questionnaire data, multiple

More information

[Page 177 (continued)] a. if ( age >= 65 ); cout << "Age is greater than or equal to 65" << endl; else cout << "Age is less than 65 << endl";

[Page 177 (continued)] a. if ( age >= 65 ); cout << Age is greater than or equal to 65 << endl; else cout << Age is less than 65 << endl; Page 1 of 10 [Page 177 (continued)] Exercises 4.11 Identify and correct the error(s) in each of the following: a. if ( age >= 65 ); cout

More information

Stat Wk 3. Stat 342 Notes. Week 3, Page 1 / 71

Stat Wk 3. Stat 342 Notes. Week 3, Page 1 / 71 Stat 342 - Wk 3 What is SQL Proc SQL 'Select' command and 'from' clause 'group by' clause 'order by' clause 'where' clause 'create table' command 'inner join' (as time permits) Stat 342 Notes. Week 3,

More information

University of California, Berkeley. CS 186 Introduction to Databases, Spring 2014, Prof. Dan Olteanu MIDTERM

University of California, Berkeley. CS 186 Introduction to Databases, Spring 2014, Prof. Dan Olteanu MIDTERM University of California, Berkeley CS 186 Introduction to Databases, Spring 2014, Prof. Dan Olteanu MIDTERM This is a closed book examination sided). but you are allowed one 8.5 x 11 sheet of notes (double

More information

Chapter 3. Iteration

Chapter 3. Iteration Chapter 3 Iteration Iteration Iteration is the form of program control that allows us to repeat a section of code. For this reason this form of control is often also referred to as repetition. The programming

More information

Contents of SAS Programming Techniques

Contents of SAS Programming Techniques Contents of SAS Programming Techniques Chapter 1 About SAS 1.1 Introduction 1.1.1 SAS modules 1.1.2 SAS module classification 1.1.3 SAS features 1.1.4 Three levels of SAS techniques 1.1.5 Chapter goal

More information

Lab #3: Probability, Simulations, Distributions:

Lab #3: Probability, Simulations, Distributions: Lab #3: Probability, Simulations, Distributions: A. Objectives: 1. Reading from an external file 2. Create contingency table 3. Simulate a probability distribution 4. The Uniform Distribution Reading from

More information

Lab #9: ANOVA and TUKEY tests

Lab #9: ANOVA and TUKEY tests Lab #9: ANOVA and TUKEY tests Objectives: 1. Column manipulation in SAS 2. Analysis of variance 3. Tukey test 4. Least Significant Difference test 5. Analysis of variance with PROC GLM 6. Levene test for

More information

CHAPTER 6. The Normal Probability Distribution

CHAPTER 6. The Normal Probability Distribution The Normal Probability Distribution CHAPTER 6 The normal probability distribution is the most widely used distribution in statistics as many statistical procedures are built around it. The central limit

More information

Distributions of Continuous Data

Distributions of Continuous Data C H A P T ER Distributions of Continuous Data New cars and trucks sold in the United States average about 28 highway miles per gallon (mpg) in 2010, up from about 24 mpg in 2004. Some of the improvement

More information

ECO375 Tutorial 1 Introduction to Stata

ECO375 Tutorial 1 Introduction to Stata ECO375 Tutorial 1 Introduction to Stata Matt Tudball University of Toronto Mississauga September 14, 2017 Matt Tudball (University of Toronto) ECO375H5 September 14, 2017 1 / 25 What Is Stata? Stata is

More information

SAS/STAT 13.1 User s Guide. The NESTED Procedure

SAS/STAT 13.1 User s Guide. The NESTED Procedure SAS/STAT 13.1 User s Guide The NESTED Procedure This document is an individual chapter from SAS/STAT 13.1 User s Guide. The correct bibliographic citation for the complete manual is as follows: SAS Institute

More information

Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Administrivia. Administrivia. Faloutsos/Pavlo CMU /615

Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Administrivia. Administrivia. Faloutsos/Pavlo CMU /615 Carnegie Mellon Univ. Dept. of Computer Science 15-415/615 - DB Applications C. Faloutsos A. Pavlo Lecture#14(b): Implementation of Relational Operations Administrivia HW4 is due today. HW5 is out. Faloutsos/Pavlo

More information

ROC Site Instructions for using Medtronic CODE STAT software

ROC Site Instructions for using Medtronic CODE STAT software ROC Site Instructions for using Medtronic CODE STAT software All ECG files that are uploaded to ROC cases must have all patient identifiers removed. The following are instructions for configuring and using

More information

Importing Career Standards Benchmark Scores

Importing Career Standards Benchmark Scores Importing Career Standards Benchmark Scores The Career Standards Benchmark assessments that are reported on the PIMS Student Fact Template for Career Standards Benchmarks can be imported en masse using

More information

Getting started with simulating data in R: some helpful functions and how to use them Ariel Muldoon August 28, 2018

Getting started with simulating data in R: some helpful functions and how to use them Ariel Muldoon August 28, 2018 Getting started with simulating data in R: some helpful functions and how to use them Ariel Muldoon August 28, 2018 Contents Overview 2 Generating random numbers 2 rnorm() to generate random numbers from

More information

Introduction to SAS. Hsueh-Sheng Wu. Center for Family and Demographic Research. November 1, 2010

Introduction to SAS. Hsueh-Sheng Wu. Center for Family and Demographic Research. November 1, 2010 Introduction to SAS Hsueh-Sheng Wu Center for Family and Demographic Research November 1, 2010 1 Outline What is SAS? Things you need to know before using SAS SAS user interface Using SAS to manage data

More information

Earthquake data in geonet.org.nz

Earthquake data in geonet.org.nz Earthquake data in geonet.org.nz There is are large gaps in the 2012 and 2013 data, so let s not use it. Instead we ll use a previous year. Go to http://http://quakesearch.geonet.org.nz/ At the screen,

More information

RITIS Training Module 4 Script

RITIS Training Module 4 Script RITIS Training Module 4 Script Welcome to the Regional Integrated Information System or RITIS Module 04 CBT. To begin, select the start button or press Shift+N on your keyboard. This training module will

More information

SAS (Statistical Analysis Software/System)

SAS (Statistical Analysis Software/System) SAS (Statistical Analysis Software/System) SAS Adv. Analytics or Predictive Modelling:- Class Room: Training Fee & Duration : 30K & 3 Months Online Training Fee & Duration : 33K & 3 Months Learning SAS:

More information

Regression Models Course Project Vincent MARIN 28 juillet 2016

Regression Models Course Project Vincent MARIN 28 juillet 2016 Regression Models Course Project Vincent MARIN 28 juillet 2016 Executive Summary "Is an automatic or manual transmission better for MPG" "Quantify the MPG difference between automatic and manual transmissions"

More information

Install RStudio from - use the standard installation.

Install RStudio from   - use the standard installation. Session 1: Reading in Data Before you begin: Install RStudio from http://www.rstudio.com/ide/download/ - use the standard installation. Go to the course website; http://faculty.washington.edu/kenrice/rintro/

More information

The NESTED Procedure (Chapter)

The NESTED Procedure (Chapter) SAS/STAT 9.3 User s Guide The NESTED Procedure (Chapter) SAS Documentation This document is an individual chapter from SAS/STAT 9.3 User s Guide. The correct bibliographic citation for the complete manual

More information

CSE 123: Computer Networks Fall Quarter, 2013 MIDTERM EXAM

CSE 123: Computer Networks Fall Quarter, 2013 MIDTERM EXAM CSE 123: Computer Networks Fall Quarter, 2013 MIDTERM EXAM Instructor: Alex C. Snoeren Name Student ID Question Score Points 1 21 2 30 3 40 4 9 Total 100 100 This exam is closed book. You are allowed one

More information

STA 570 Spring Lecture 5 Tuesday, Feb 1

STA 570 Spring Lecture 5 Tuesday, Feb 1 STA 570 Spring 2011 Lecture 5 Tuesday, Feb 1 Descriptive Statistics Summarizing Univariate Data o Standard Deviation, Empirical Rule, IQR o Boxplots Summarizing Bivariate Data o Contingency Tables o Row

More information

The EMCLUS Procedure. The EMCLUS Procedure

The EMCLUS Procedure. The EMCLUS Procedure The EMCLUS Procedure Overview Procedure Syntax PROC EMCLUS Statement VAR Statement INITCLUS Statement Output from PROC EMCLUS EXAMPLES-SECTION Example 1: Syntax for PROC FASTCLUS Example 2: Use of the

More information

Chapter 7. The Data Frame

Chapter 7. The Data Frame Chapter 7. The Data Frame The R equivalent of the spreadsheet. I. Introduction Most analytical work involves importing data from outside of R and carrying out various manipulations, tests, and visualizations.

More information

Microsoft Access 2016

Microsoft Access 2016 Access 2016 Instructor s Manual Page 1 of 10 Microsoft Access 2016 Module Two: Querying a Database A Guide to this Instructor s Manual: We have designed this Instructor s Manual to supplement and enhance

More information

Class Note #02. [Overall Information] [During the Lecture]

Class Note #02. [Overall Information] [During the Lecture] Class Note #02 Date: 01/11/2006 [Overall Information] In this class, after a few additional announcements, we study the worst-case running time of Insertion Sort. The asymptotic notation (also called,

More information

A quick introduction to STATA:

A quick introduction to STATA: 1 Revised September 2008 A quick introduction to STATA: (by E. Bernhardsen, with additions by H. Goldstein) 1. How to access STATA from the pc s at the computer lab After having logged in you have to log

More information

SAS Cloud Analytic Services 3.1: Graphing Your Output

SAS Cloud Analytic Services 3.1: Graphing Your Output SAS Cloud Analytic Services 3.1: Graphing Your Output SAS Documentation The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2016. SAS Cloud Analytic Services 3.1: Graphing

More information

StatsMate. User Guide

StatsMate. User Guide StatsMate User Guide Overview StatsMate is an easy-to-use powerful statistical calculator. It has been featured by Apple on Apps For Learning Math in the App Stores around the world. StatsMate comes with

More information

CS 540: Introduction to Artificial Intelligence

CS 540: Introduction to Artificial Intelligence CS 540: Introduction to Artificial Intelligence Midterm Exam: 7:15-9:15 pm, October, 014 Room 140 CS Building CLOSED BOOK (one sheet of notes and a calculator allowed) Write your answers on these pages

More information

Computational statistics Jamie Griffin. Semester B 2018 Lecture 1

Computational statistics Jamie Griffin. Semester B 2018 Lecture 1 Computational statistics Jamie Griffin Semester B 2018 Lecture 1 Course overview This course is not: Statistical computing Programming This course is: Computational statistics Statistical methods that

More information

Microsoft Access 2016

Microsoft Access 2016 Access 2016 Instructor s Manual Page 1 of 10 Microsoft Access 2016 Module Two: Querying a Database A Guide to this Instructor s Manual: We have designed this Instructor s Manual to supplement and enhance

More information

Biostatistics & SAS programming. Kevin Zhang

Biostatistics & SAS programming. Kevin Zhang Biostatistics & SAS programming Kevin Zhang January 26, 2017 Biostat 1 Instructor Instructor: Dong Zhang (Kevin) Office: Ben Franklin Hall 227 Phone: 570-389-4556 Email: dzhang(at)bloomu.edu Class web:

More information

Lecture Transcript While and Do While Statements in C++

Lecture Transcript While and Do While Statements in C++ Lecture Transcript While and Do While Statements in C++ Hello and welcome back. In this lecture we are going to look at the while and do...while iteration statements in C++. Here is a quick recap of some

More information

CS 134 Midterm Fall 2006

CS 134 Midterm Fall 2006 CS 34 Midterm Fall 26 This is a closed book exam. You have 5 minutes to complete the exam. There are 5 questions on this examination. The point values for the questions are shown in the table below. Your

More information

while for do while ! set a counter variable to 0 ! increment it inside the loop (each iteration)

while for do while ! set a counter variable to 0 ! increment it inside the loop (each iteration) Week 7: Advanced Loops while Loops in C++ (review) while (expression) may be a compound (a block: {s) Gaddis: 5.7-12 CS 1428 Fall 2015 Jill Seaman 1 for if expression is true, is executed, repeat equivalent

More information

How to Improve Your Campaign Conversion Rates

How to Improve Your  Campaign Conversion Rates How to Improve Your Email Campaign Conversion Rates Chris Williams Author of 7 Figure Business Models How to Exponentially Increase Conversion Rates I'm going to teach you my system for optimizing an email

More information

Midterm 1: CS186, Spring I. Storage: Disk, Files, Buffers [11 points] cs186-

Midterm 1: CS186, Spring I. Storage: Disk, Files, Buffers [11 points] cs186- Midterm 1: CS186, Spring 2016 Name: Class Login: cs186- You should receive 1 double-sided answer sheet and an 11-page exam. Mark your name and login on both sides of the answer sheet, and in the blanks

More information

WKn Chapter. Note to UNIX and OS/390 Users. Import/Export Facility CHAPTER 9

WKn Chapter. Note to UNIX and OS/390 Users. Import/Export Facility CHAPTER 9 117 CHAPTER 9 WKn Chapter Note to UNIX and OS/390 Users 117 Import/Export Facility 117 Understanding WKn Essentials 118 WKn Files 118 WKn File Naming Conventions 120 WKn Data Types 120 How the SAS System

More information

Effectively Utilizing Loops and Arrays in the DATA Step

Effectively Utilizing Loops and Arrays in the DATA Step Paper 1618-2014 Effectively Utilizing Loops and Arrays in the DATA Step Arthur Li, City of Hope National Medical Center, Duarte, CA ABSTRACT The implicit loop refers to the DATA step repetitively reading

More information

Computer Science 1 CSCI-1100 Spring Semester 2015 Exam 1 Overview and Practice Questions

Computer Science 1 CSCI-1100 Spring Semester 2015 Exam 1 Overview and Practice Questions Computer Science 1 CSCI-1100 Spring Semester 2015 Exam 1 Overview and Practice Questions REMINDERS Exam 1 will be held Monday, March 2, 2015. Most of you will take the exam from 6:00-7:50PM in DCC 308.

More information

THIS IS NOT REPRESNTATIVE OF CURRENT CLASS MATERIAL. STOR 455 Midterm 1 September 28, 2010

THIS IS NOT REPRESNTATIVE OF CURRENT CLASS MATERIAL. STOR 455 Midterm 1 September 28, 2010 THIS IS NOT REPRESNTATIVE OF CURRENT CLASS MATERIAL STOR 455 Midterm September 8, INSTRUCTIONS: BOTH THE EXAM AND THE BUBBLE SHEET WILL BE COLLECTED. YOU MUST PRINT YOUR NAME AND SIGN THE HONOR PLEDGE

More information

Introduction to R Software

Introduction to R Software 1. Introduction R is a free software environment for statistical computing and graphics. It is almost perfectly compatible with S-plus. The only thing you need to do is download the software from the internet

More information

CS 177 Week 15 Recitation Slides. Review

CS 177 Week 15 Recitation Slides. Review CS 177 Week 15 Recitation Slides Review 1 Announcements Final Exam on Friday Dec. 18 th STEW 183 from 1 3 PM Complete your online review of your classes. Your opinion matters!!! Project 6 due Just kidding

More information

CONTENTS: What Is Programming? How a Computer Works Programming Languages Java Basics. COMP-202 Unit 1: Introduction

CONTENTS: What Is Programming? How a Computer Works Programming Languages Java Basics. COMP-202 Unit 1: Introduction CONTENTS: What Is Programming? How a Computer Works Programming Languages Java Basics COMP-202 Unit 1: Introduction Announcements Did you miss the first lecture? Come talk to me after class. If you want

More information

BUSINESS ANALYTICS. 96 HOURS Practical Learning. DexLab Certified. Training Module. Gurgaon (Head Office)

BUSINESS ANALYTICS. 96 HOURS Practical Learning. DexLab Certified. Training Module. Gurgaon (Head Office) SAS (Base & Advanced) Analytics & Predictive Modeling Tableau BI 96 HOURS Practical Learning WEEKDAY & WEEKEND BATCHES CLASSROOM & LIVE ONLINE DexLab Certified BUSINESS ANALYTICS Training Module Gurgaon

More information

Microsoft Access - Using Relational Database Data Queries (Stored Procedures) Paul A. Harris, Ph.D. Director, GCRC Informatics.

Microsoft Access - Using Relational Database Data Queries (Stored Procedures) Paul A. Harris, Ph.D. Director, GCRC Informatics. Microsoft Access - Using Relational Database Data Queries (Stored Procedures) Paul A. Harris, Ph.D. Director, GCRC Informatics October 01, 2004 What is Microsoft Access? Microsoft Access is a relational

More information

Spring 2017 CS130 - Intro to R 1 R VISUALIZING DATA. Spring 2017 CS130 - Intro to R 2

Spring 2017 CS130 - Intro to R 1 R VISUALIZING DATA. Spring 2017 CS130 - Intro to R 2 Spring 2017 CS130 - Intro to R 1 R VISUALIZING DATA Spring 2017 Spring 2017 CS130 - Intro to R 2 Goals for this lecture: Review constructing Data Frame, Categorizing variables Construct basic graph, learn

More information

Midterm 1: CS186, Spring I. Storage: Disk, Files, Buffers [11 points] SOLUTION. cs186-

Midterm 1: CS186, Spring I. Storage: Disk, Files, Buffers [11 points] SOLUTION. cs186- Midterm 1: CS186, Spring 2016 Name: Class Login: SOLUTION cs186- You should receive 1 double-sided answer sheet and an 10-page exam. Mark your name and login on both sides of the answer sheet, and in the

More information

LAKEWOOD INSTRUMENTS REMOTE WINDOWS SOFTWARE

LAKEWOOD INSTRUMENTS REMOTE WINDOWS SOFTWARE LAKEWOOD INSTRUMENTS REMOTE WINDOWS SOFTWARE USER S MANUAL Lakewood Instruments 7838 North Faulkner Road, Milwaukee, WI 53224 USA Phone (800) 228-0839 Fax (414) 355-3508 http://www.lakewoodinstruments.com

More information

Exercise 1: Introduction to Stata

Exercise 1: Introduction to Stata Exercise 1: Introduction to Stata New Stata Commands use describe summarize stem graph box histogram log on, off exit New Stata Commands Downloading Data from the Web I recommend that you use Internet

More information

Lecture 22. While Loops

Lecture 22. While Loops Lecture 22 While Loops Announcements for This Lecture Assignments Prelim 2 A5 is now graded Will be returned in lab Mean: 52 Median: 53 Std Dev: 5.5 Passing Grade: 30 A6 due next Tuesday Dataset should

More information

CS 200. Lecture 06. Database Introduction. Database Introduction. CS 200 Winter 2018

CS 200. Lecture 06. Database Introduction. Database Introduction. CS 200 Winter 2018 CS 200 Lecture 06 1 Miscellaneous Notes Abbreviations aka also known as DBMS DataBase Management System mutatis mutantis with the necessary changes having been made 2 Please read and highlight BEFORE lab

More information

Lab 3 (80 pts.) - Assessing the Normality of Data Objectives: Creating and Interpreting Normal Quantile Plots

Lab 3 (80 pts.) - Assessing the Normality of Data Objectives: Creating and Interpreting Normal Quantile Plots STAT 350 (Spring 2015) Lab 3: SAS Solutions 1 Lab 3 (80 pts.) - Assessing the Normality of Data Objectives: Creating and Interpreting Normal Quantile Plots Note: The data sets are not included in the solutions;

More information

STAT 7000: Experimental Statistics I

STAT 7000: Experimental Statistics I STAT 7000: Experimental Statistics I 2. A Short SAS Tutorial Peng Zeng Department of Mathematics and Statistics Auburn University Fall 2009 Peng Zeng (Auburn University) STAT 7000 Lecture Notes Fall 2009

More information

ICT IGCSE Databases (Access)

ICT IGCSE Databases (Access) Open and Save (Create) Database 3 1 2 4 Lawsons 1) Open Microsoft Access 2) Write the name of the database file 3) Select the destination folder and choose the location for the file. 4) Select OK and then

More information

Assignment 0. Nothing here to hand in

Assignment 0. Nothing here to hand in Assignment 0 Nothing here to hand in The questions here have solutions attached. Follow the solutions to see what to do, if you cannot otherwise guess. Though there is nothing here to hand in, it is very

More information

Instructor: Craig Duckett. Lecture 03: Tuesday, April 3, 2018 SQL Sorting, Aggregates and Joining Tables

Instructor: Craig Duckett. Lecture 03: Tuesday, April 3, 2018 SQL Sorting, Aggregates and Joining Tables Instructor: Craig Duckett Lecture 03: Tuesday, April 3, 2018 SQL Sorting, Aggregates and Joining Tables 1 Assignment 1 is due LECTURE 5, Tuesday, April 10 th, 2018 in StudentTracker by MIDNIGHT MID-TERM

More information

University of California, Berkeley. (2 points for each row; 1 point given if part of the change in the row was correct)

University of California, Berkeley. (2 points for each row; 1 point given if part of the change in the row was correct) University of California, Berkeley CS 186 Intro to Database Systems, Fall 2012, Prof. Michael J. Franklin MIDTERM II - Questions This is a closed book examination but you are allowed one 8.5 x 11 sheet

More information

Midterm #2a Fall minutes

Midterm #2a Fall minutes 15-110 Midterm #2a Fall 2018 50 minutes Name: Andrew ID: @andrew.cmu.edu Section: You may not use any books, notes, or electronic devices during this exam. You may not ask questions about the exam except

More information

Resources for statistical assistance. Quantitative covariates and regression analysis. Methods for predicting continuous outcomes.

Resources for statistical assistance. Quantitative covariates and regression analysis. Methods for predicting continuous outcomes. Resources for statistical assistance Quantitative covariates and regression analysis Carolyn Taylor Applied Statistics and Data Science Group (ASDa) Department of Statistics, UBC January 24, 2017 Department

More information

Chapter 12: Social Implications of IT

Chapter 12: Social Implications of IT !" #$$ %! & The final exam will be cumulative! Please also study previous midterm reviews and exams and other material from the beginning of the course. For instance: Six Steps in the Debugging Process

More information

Complete Assignment #1 listed below on WK #1 in packet. Textbook required!!!

Complete Assignment #1 listed below on WK #1 in packet. Textbook required!!! 400Algebra 2H ASSIGNMENT SHEETrev14 CHAPTER 3: Linear Functions with Review of Chapter 1 and 2 (3-1 to 3-4 Highlights on reverse side) Directions: 1. Review classwork and read each section in textbook

More information

Quick Start Guide. Version R94. English

Quick Start Guide. Version R94. English Custom Reports Quick Start Guide Version R94 English December 12, 2016 Copyright Agreement The purchase and use of all Software and Services is subject to the Agreement as defined in Kaseya s Click-Accept

More information

10266 Programming in C Sharp with Microsoft Visual Studio 2010

10266 Programming in C Sharp with Microsoft Visual Studio 2010 10266 Programming in C Sharp with Microsoft Visual Studio 2010 Course Number: 10266A Category: Visual Studio 2010 Duration: 5 days Course Description The course focuses on C# program structure, language

More information

CS Final Exam Review Suggestions

CS Final Exam Review Suggestions CS 325 - Final Exam Review Suggestions p. 1 last modified: 2017-12-06 CS 325 - Final Exam Review Suggestions Based on suggestions from Prof. Deb Pires from UCLA: Because of the research-supported learning

More information

SAS 9 Programming Enhancements Marje Fecht, Prowerk Consulting Ltd Mississauga, Ontario, Canada

SAS 9 Programming Enhancements Marje Fecht, Prowerk Consulting Ltd Mississauga, Ontario, Canada SAS 9 Programming Enhancements Marje Fecht, Prowerk Consulting Ltd Mississauga, Ontario, Canada ABSTRACT Performance improvements are the well-publicized enhancement to SAS 9, but what else has changed

More information

STANDARDS OF LEARNING CONTENT REVIEW NOTES ALGEBRA I. 4 th Nine Weeks,

STANDARDS OF LEARNING CONTENT REVIEW NOTES ALGEBRA I. 4 th Nine Weeks, STANDARDS OF LEARNING CONTENT REVIEW NOTES ALGEBRA I 4 th Nine Weeks, 2016-2017 1 OVERVIEW Algebra I Content Review Notes are designed by the High School Mathematics Steering Committee as a resource for

More information

Problem Set 3 CMSC 426 Due: Thursday, April 3

Problem Set 3 CMSC 426 Due: Thursday, April 3 Problem Set 3 CMSC 426 Due: Thursday, April 3 Overview: This problem set will work a little different. There will be a standard part, and an advanced part. Students may choose to do either part. Alternately,

More information

PowerPoint Presentation to Accompany GO! All In One. Chapter 13

PowerPoint Presentation to Accompany GO! All In One. Chapter 13 PowerPoint Presentation to Accompany GO! Chapter 13 Create, Query, and Sort an Access Database; Create Forms and Reports 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Objectives Identify Good

More information

IQC monitoring in laboratory networks

IQC monitoring in laboratory networks IQC for Networked Analysers Background and instructions for use IQC monitoring in laboratory networks Modern Laboratories continue to produce large quantities of internal quality control data (IQC) despite

More information

1. Make a bar graph in Excel. (1.5 points) Copy the following table into two columns under a blank worksheet in Excel.

1. Make a bar graph in Excel. (1.5 points) Copy the following table into two columns under a blank worksheet in Excel. STAT 243 Lab 3 Rachel Webb 25 points This lab should be done using Microsoft Excel available in all PSU computer labs. A hard copy of your output is to be handed in to during lecture on the due date posted

More information

Biology 345: Biometry Fall 2005 SONOMA STATE UNIVERSITY Lab Exercise 2 Working with data in Excel and exporting to JMP Introduction

Biology 345: Biometry Fall 2005 SONOMA STATE UNIVERSITY Lab Exercise 2 Working with data in Excel and exporting to JMP Introduction Biology 345: Biometry Fall 2005 SONOMA STATE UNIVERSITY Lab Exercise 2 Working with data in Excel and exporting to JMP Introduction In this exercise, we will learn how to reorganize and reformat a data

More information

Structure and Interpretation of Computer Programs

Structure and Interpretation of Computer Programs CS 61A Fall 2018 Structure and Interpretation of Computer Programs Final INSTRUCTIONS You have 3 hours to complete the exam. The exam is closed book, closed notes, closed computer, closed calculator, except

More information

Ms Excel Vba Continue Loop Through Range Of

Ms Excel Vba Continue Loop Through Range Of Ms Excel Vba Continue Loop Through Range Of Rows Learn how to make your VBA code dynamic by coding in a way that allows your 5 Different Ways to Find The Last Row or Last Column Using VBA In Microsoft

More information

ASTEROID. New Features and Enhancements in ASTEROID v5.24. ASTEROID Support: Phone: (03)

ASTEROID. New Features and Enhancements in ASTEROID v5.24. ASTEROID Support:   Phone: (03) ASTEROID New Features and Enhancements in ASTEROID v5.24 ASTEROID Support: Email: asteroid.support@roymorgan.com Phone: (03) 9223 2428 Please continue to provide feedback so that we are able to better

More information

1 RefresheR. Figure 1.1: Soy ice cream flavor preferences

1 RefresheR. Figure 1.1: Soy ice cream flavor preferences 1 RefresheR Figure 1.1: Soy ice cream flavor preferences 2 The Shape of Data Figure 2.1: Frequency distribution of number of carburetors in mtcars dataset Figure 2.2: Daily temperature measurements from

More information

Importing CSV Data to All Character Variables Arthur L. Carpenter California Occidental Consultants, Anchorage, AK

Importing CSV Data to All Character Variables Arthur L. Carpenter California Occidental Consultants, Anchorage, AK PharmaSUG 2017 QT02 Importing CSV Data to All Character Variables Arthur L. Carpenter California Occidental Consultants, Anchorage, AK ABSTRACT Have you ever needed to import data from a CSV file and found

More information

Deep Dive: Pronto Transformations Reference

Deep Dive: Pronto Transformations Reference Deep Dive: Pronto Transformations Reference Available Transformations and Their Icons Transform Description Menu Icon Add Column on page 2 Important: Not available in Trial. Upgrade to Pro Edition! Add

More information

CSCI-1200 Data Structures Fall 2018 Lecture 5 Pointers, Arrays, & Pointer Arithmetic

CSCI-1200 Data Structures Fall 2018 Lecture 5 Pointers, Arrays, & Pointer Arithmetic CSCI-1200 Data Structures Fall 2018 Lecture 5 Pointers, Arrays, & Pointer Arithmetic Announcements: Test 1 Information Test 1 will be held Thursday, Sept 20th, 2018 from 6-7:50pm Students will be randomly

More information

Q1: Multiple choice / 20 Q2: Arrays / 40 Q3: Functions / 40 TOTAL SCORE / 100 EXTRA CREDIT / 10

Q1: Multiple choice / 20 Q2: Arrays / 40 Q3: Functions / 40 TOTAL SCORE / 100 EXTRA CREDIT / 10 EECE.2160: ECE Application Programming Spring 2017 Exam 2 March 29, 2017 Name: Section (circle 1): 201 (Dr. Li, MWF 8-8:50) 202 (Dr. Geiger, MWF 12-12:50) For this exam, you may use only one 8.5 x 11 double-sided

More information

CHAPTER 2: SAMPLING AND DATA

CHAPTER 2: SAMPLING AND DATA CHAPTER 2: SAMPLING AND DATA This presentation is based on material and graphs from Open Stax and is copyrighted by Open Stax and Georgia Highlands College. OUTLINE 2.1 Stem-and-Leaf Graphs (Stemplots),

More information

(Python) Chapter 3: Repetition

(Python) Chapter 3: Repetition (Python) Chapter 3: Repetition 3.1 while loop Motivation Using our current set of tools, repeating a simple statement many times is tedious. The only item we can currently repeat easily is printing the

More information

Last Updated: 08/28/09. Imaging Concepts

Last Updated: 08/28/09. Imaging Concepts Last Updated: 08/28/09 Imaging Concepts Table of Contents What is a Folder?... 3 What is a File?... 4 What is an Image?... 4 How to collaborate while processing files?... 4 What is a File Type?... 5 How

More information

ENGR 100 Midterm (CSE Part) Winter 2014

ENGR 100 Midterm (CSE Part) Winter 2014 ENGR 100 Midterm (CSE Part) Winter 2014 There are two parts in this midterm. This part focuses on the CSE aspects of the course. You will have 80 minutes to work on the exam. We recommend you spend about

More information

Introduction to Software Testing Chapter 2.3 Graph Coverage for Source Code. Paul Ammann & Jeff Offutt

Introduction to Software Testing Chapter 2.3 Graph Coverage for Source Code. Paul Ammann & Jeff Offutt Introduction to Software Testing Chapter 2.3 Graph Coverage for Source Code Paul Ammann & Jeff Offutt Overview The most common application of graph criteria is to program source Graph : Usually the control

More information

Part 1. Summary of For Loops and While Loops

Part 1. Summary of For Loops and While Loops NAME EET 2259 Lab 5 Loops OBJECTIVES -Understand when to use a For Loop and when to use a While Loop. -Write LabVIEW programs using each kind of loop. -Write LabVIEW programs with one loop inside another.

More information

University of Massachusetts Amherst, Electrical and Computer Engineering

University of Massachusetts Amherst, Electrical and Computer Engineering University of Massachusetts Amherst, Electrical and Computer Engineering ECE 122 Midterm Exam 1 Makeup Answer key March 2, 2018 Instructions: Closed book, Calculators allowed; Duration:120 minutes; Write

More information

Barchard Introduction to SPSS Marks

Barchard Introduction to SPSS Marks Barchard Introduction to SPSS 22.0 3 Marks Purpose The purpose of this assignment is to introduce you to SPSS, the most commonly used statistical package in the social sciences. You will create a new data

More information

Programming in C# with Microsoft Visual Studio 2010

Programming in C# with Microsoft Visual Studio 2010 Programming in C# with Microsoft Visual Studio 2010 Course 10266; 5 Days, Instructor-led Course Description: The course focuses on C# program structure, language syntax, and implementation details with.net

More information

Instructor: Craig Duckett. Lecture 04: Thursday, April 5, Relationships

Instructor: Craig Duckett. Lecture 04: Thursday, April 5, Relationships Instructor: Craig Duckett Lecture 04: Thursday, April 5, 2018 Relationships 1 Assignment 1 is due NEXT LECTURE 5, Tuesday, April 10 th in StudentTracker by MIDNIGHT MID-TERM EXAM is LECTURE 10, Tuesday,

More information

EZ Arms Keeper. Instruction Manual. EZ Arms Keeper Instruction Manual Page 1 of 162 Copyright EZ Arms, LLC. All rights reserved.

EZ Arms Keeper. Instruction Manual. EZ Arms Keeper Instruction Manual Page 1 of 162 Copyright EZ Arms, LLC. All rights reserved. EZ Arms Keeper Instruction Manual EZ Arms Keeper Instruction Manual Page 1 of 162 Table of Contents Preface... 8 Overview... 8 Technical Assistance... 8 Getting Started... 9 Launch EZ Arms Keeper Program...

More information

COS 226 Midterm Exam, Spring 2009

COS 226 Midterm Exam, Spring 2009 NAME: login ID: precept: COS 226 Midterm Exam, Spring 2009 This test is 10 questions, weighted as indicated. The exam is closed book, except that you are allowed to use a one page cheatsheet. No calculators

More information

Business Data Analysis MA0123. Dr Gavin Shaddick Department of Mathematical Sciences 4W 5.7

Business Data Analysis MA0123. Dr Gavin Shaddick Department of Mathematical Sciences 4W 5.7 Business Data Analysis MA0123 Dr Gavin Shaddick Department of Mathematical Sciences g.shaddick@bath.ac.uk 4W 5.7 Lectures and computer labs Two lectures a week (Monday and Friday). One computing lab (time

More information

SD10 A SAS MACRO FOR PERFORMING BACKWARD SELECTION IN PROC SURVEYREG

SD10 A SAS MACRO FOR PERFORMING BACKWARD SELECTION IN PROC SURVEYREG Paper SD10 A SAS MACRO FOR PERFORMING BACKWARD SELECTION IN PROC SURVEYREG Qixuan Chen, University of Michigan, Ann Arbor, MI Brenda Gillespie, University of Michigan, Ann Arbor, MI ABSTRACT This paper

More information

Chapter 5. Repetition. Contents. Introduction. Three Types of Program Control. Two Types of Repetition. Three Syntax Structures for Looping in C++

Chapter 5. Repetition. Contents. Introduction. Three Types of Program Control. Two Types of Repetition. Three Syntax Structures for Looping in C++ Repetition Contents 1 Repetition 1.1 Introduction 1.2 Three Types of Program Control Chapter 5 Introduction 1.3 Two Types of Repetition 1.4 Three Structures for Looping in C++ 1.5 The while Control Structure

More information