Step by Step Basic Statistics Using SAS Exercises

Download Step by Step Basic Statistics Using SAS Exercises

Post on 08-Sep-2015

6 views

Category:

Documents

0 download

Embed Size (px)

DESCRIPTION

Excellent book for reading statistics. This explore the use of SAS in statistics in rigorous form. It is wonderful for beginners.

TRANSCRIPT

<ul><li><p> Praise for Larry Hatcher </p><p>The problems are interesting, and the tasks required are those a researcher must undertake. Students who work through all of the exercises in this book will definitely be confident and prepared to use SAS to conduct these analyses independently. </p><p>Sheri Bauman, Ph.D. Assistant Professor </p><p>Department of Educational Psychology University of Arizona, Tucson </p><p>My graduate students and I have had a good chance to look over the new workbook...The general consensus is that it is extremely successful on a number of levels. [Larry Hatcher has] thought of everything...We especially like how [he] incorporated additional explanations to help students navigate the computer itself. </p><p> Frank Pajares </p><p>Winship Distinguished Research Professor Emory University </p></li><li><p>BASICSTATISTICS</p><p>Using SASL A R R Y H A T C H E R , P H . D .</p><p>E X E R C I S E SStep-by-Step</p></li><li><p>The correct bibliographic citation for this manual is as follows: Hatcher, Larry. 2003. Step-by-Step Basic Statistics Using SAS: Exercises, Cary, NC: SAS Institute Inc. </p><p>Step-by-Step Basic Statistics Using SAS: Exercises </p><p>Copyright 2003 by SAS Institute Inc., Cary, NC, USA. </p><p>ISBN 1-59047-149-0 </p><p>All rights reserved. Printed in the United States of America. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, or otherwise, without the prior written permission of the publisher, SAS Institute Inc. </p><p>U.S. Government Restricted Rights Notice: Use, duplication, or disclosure of this software and related documentation by the U.S. government is subject to the Agreement with SAS Institute and the restrictions set forth in FAR 52.227-19, Commercial Computer Software-Restricted Rights (June 1987). SAS Institute Inc., SAS Campus Drive, Cary, North Carolina 27513. </p><p>1st printing, April 2003 </p><p>Note that text corrections may have been made at each printing. </p><p>SAS Publishing provides a complete selection of books and electronic products to help customers use SAS software to its fullest potential. For more information about our e-books, e-learning products, CDs, and hard- copy books, visit the SAS Publishing Web site at support.sas.com/pubs or call 1-800-727-3228. </p><p>SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. indicates USA registration. </p><p>Other brand and product names are trademarks of their respective companies. </p></li><li><p>Contents </p><p>Acknowledgments.......................................................................... ix Exercises for Chapter 3: Writing and Submitting </p><p>SAS Programs .......................................................................... 3 Exercise 3.1: Computing Mean Height, Weight, and Age......... 3 Exercise 3.2: Computing Mean Age, IQ, and Income............... 6 </p><p>Exercises for Chapter 4: Data Input ........................................... 9 Exercise 4.1: Creating and Analyzing a Data Set </p><p>Containing LAT Test Scores ................................................. 9 Exercise 4.2: Creating and Analyzing a Data Set </p><p>Containing Information About Volunteerism........................ 14 Exercises for Chapter 5: Creating Frequency Tables............. 21 </p><p>Exercise 5.1: Using PROC FREQ to Analyze LAT Data......... 21 Exercise 5.2: Using PROC FREQ to Analyze Exercise </p><p>Data .................................................................................... 27 Exercises for Chapter 6: Creating Graphs............................... 33 </p><p>Exercise 6.1: Using PROC CHART to Create Bar Charts from LAT Data ......................................................... 33 </p><p>Exercise 6.2: Using PROC CHART to Create Bar Charts from an Experiment About Goal Setting .................. 38 </p><p>Exercises for Chapter 7: Measures of Central Tendency and Variability......................................................................... 47 Exercise 7.1: Using PROC UNIVARIATE to Identify </p><p>Normal, Skewed, and Bimodal Distributions ....................... 47 Exercise 7.2: Using PROC UNIVARIATE and PROC </p><p>MEANS to Compute Measures of Variability ...................... 56 </p></li><li><p>iv Contents </p><p>Exercises for Chapter 8: Creating and Modifying Variables and Data Sets......................................................... 63Exercise 8.1: Working with an Academic Development </p><p>Questionnaire ..................................................................... 63Exercise 8.2: Using Subsetting IF Statements with the </p><p>Academic Development Data ............................................. 70Exercises for Chapter 9: z Scores ............................................ 77 </p><p>Exercise 9.1: Satisfaction with Academic Development and the Social Environment Among College Students........ 77 </p><p>Exercise 9.2: Physical Fitness and Verbal Ability .................. 84 Exercises for Chapter 10: Bivariate Correlation....................... 91</p><p>Exercise 10.1: Correlational Study of Drinking and Driving Behavior.................................................................. 91</p><p>Exercise 10.2: Correlational Study of Nurses Intent to Remain ............................................................................. 100</p><p>Exercises for Chapter 11: Bivariate Regression..................... 107 Exercise 11.1: Predicting Current Drinking and Driving </p><p>Behavior from Previous Behavior...................................... 107Exercise 11.2: Predicting Nurses Intent to Remain from </p><p>Emotional Exhaustion ....................................................... 115 Exercises for Chapter 12: Single-Sample t Test .......................123</p><p>Exercise 12.1: Answering SAT Reading Comprehension Questions Without the Passages....................................... 123</p><p>Exercise 12.2: Predicting the Results of Coin Flips .............. 129Exercises for Chapter 13: Independent-Samples t Test .......... 135 </p><p>Exercise 13.1: Sex Differences in Sexual Jealousy.............. 135Exercise 13.2: Effect of Interviewer Suspicion on </p><p>Interviewee Nervousness.................................................. 142Exercises for Chapter 14: Paired-Samples t Test .................... 151</p><p>Exercise 14.1: Perceived Problem Seriousness as a Function of Time of Day.................................................... 151</p><p>Exercise 14.2: Effect of Functional Family Therapy on Probation Compliance for Juvenile Delinquents ............... 159</p></li><li><p> Contents v </p><p>Exercises for Chapter 15: One-Way ANOVA with One Between-Subjects Factor..........................................................167Exercise 15.1: The Effect of Misleading Suggestions on </p><p>the Creation of False Memories........................................ 167Exercise 15.2: The Effect of News Source Credibility on </p><p>Voter Reactions to Political Scandal ................................. 177 Exercises for Chapter 16: Factorial ANOVA with Two </p><p>Between-Subjects Factors ................................................... 187Exercise 16.1: The Effects of Misleading Suggestions </p><p>and Pre-Event Instructions on the Creation of False Memories ................................................................ 187 </p><p>Exercise 16.2: The Effect of News Source Credibility and Nature of the Scandal on Voter Reactions to Political Scandal................................................................ 198</p><p>Exercises for Chapter 17: Chi-Square Test of Independence ....................................................................... 209Exercise 17.1: The Relationship Between Sex of </p><p>Children and Marital Disruption......................................... 209 Exercise 17.2: The Relationship Between Membership </p><p>in College Student Organizations and Sexually Coercive Behavior in Men................................................. 218 </p><p>Solution for Chapter 3: Writing and Submitting SAS Programs ...................................................................... 229 Solution to Exercise 3.1: Computing Mean Height, </p><p>Weight, and Age ............................................................... 229Solution for Chapter 4: Data Input...........................................233</p><p>Solution to Exercise 4.1: Creating a Data Set Containing LAT Test Scores ............................................................... 233</p><p>Solution for Chapter 5: Creating Frequency Tables ............. 237Solution to Exercise 5.1: Using PROC FREQ to Analyze </p><p>LAT Data........................................................................... 237 </p></li><li><p>vi Contents </p><p>Solution for Chapter 6: Creating Graphs ............................... 241 Solution to Exercise 6.1: Using PROC CHART to Create </p><p>Bar Charts from LAT Data ................................................ 241Solution for Chapter 7: Measures of Central Tendency and </p><p>Variability............................................................................... 247Solution to Exercise 7.1: Using PROC UNIVARIATE to </p><p>Identify Normal, Skewed, and Bimodal Distributions......... 247Solution for Chapter 8: Creating and Modifying Variables </p><p>and Data Sets ....................................................................... 259Solution to Exercise 8.1: Working with an Academic </p><p>Development Questionnaire ............................................. 259Solution for Chapter 9: z Scores ............................................265</p><p>Solution to Exercise 9.1: Satisfaction with Academic Development and the Social Environment Among College Students............................................................... 265</p><p>Solution for Chapter 10: Bivariate Correlation...................... 271Solution to Exercise 10.1: Correlational Study of Drinking </p><p>and Driving Behavior......................................................... 271Solution for Chapter 11: Bivariate Regression...................... 277</p><p>Solution to Exercise 11.1: Predicting Current Drinking and Driving Behavior from Previous Behavior ......................... 277</p><p>Solution for Chapter 12: Single-Sample t Test ...................... 285Solution to Exercise 12.1: Answering SAT Reading </p><p>Comprehension Questions Without the Passages............ 285Solution for Chapter 13: Independent-Samples t Test ......... 289</p><p>Solution to Exercise 13.1: Sex Differences in Sexual Jealousy............................................................................ 289 </p><p>Solution for Chapter 14: Paired-Samples t Test.................... 295Solution to Exercise 14.1: Perceived Problem </p><p>Seriousness as a Function of Time of Day ....................... 295 </p></li><li><p> Contents vii </p><p>Solution for Chapter 15: One-Way ANOVA with One Between-Subjects Factor .................................................... 301 Solution to Exercise 15.1: The Effect of Misleading </p><p>Suggestions on the Creation of False Memories .............. 301Solution for Chapter 16: Factorial ANOVA with Two </p><p>Between-Subjects Factors .................................................. 311Exercise 16.1: The Effects of Misleading Suggestions </p><p>and Pre-Event Instructions on the Creation of False Memories ................................................................ 311</p><p>Solution for Chapter 17: Chi-Square Test of Independence ....................................................................... 321Solution to Exercise 17.1: The Relationship Between </p><p>Sex of Children and Marital Disruption.............................. 321Index ......................................................................................... 327</p></li><li><p>viii Contents </p></li><li><p>Acknowledgments </p><p>During the development of these books, Caroline Brickley, Gretchen Rorie Harwood, Stephenie Joyner, Sue Kocher, Patsy Poole, and Hanna Schoenrock served as editors. All were positive, supportive, and helpful. They made the books stronger, and I thank them for their guidance. </p><p>A number of other people at SAS made valuable contributions in a variety of areas. My sincere thanks go to those who reviewed the books for technical accuracy and readability: Jim Ashton, Jim Ford, Marty Hultgren, Catherine Lumsden, Elizabeth Maldonado, Paul Marovich, Ted Meleky, Annette Sanders, Kevin Scott, Ron Statt, and Morris Vaughan. I also thank Candy Farrell and Karen Perkins for production and design; Joan Stout for indexing; Cindy Puryear and Patricia Spain for marketing; and Cate Parrish for the cover designs. </p><p>Special thanks to my wife Ellen, who was loving and supportive throughout. </p><p>. </p></li><li><p>x Step-by-Step Basic Statistics Using SAS: Exercises </p></li><li><p>Overview </p><p>This section contains two exercises for each chapter, beginning with Chapter 3, Writing and Submitting SAS Programs. Each exercise includes an overviewthat describes the purpose of the exercise, a detailed description of the assignment, a list of the items to be handed in, and hints on completing the assignment.</p></li><li><p>2 Step-by-Step Basic Statistics Using SAS: Exercises </p></li><li><p>Exercises for Chapter 3 3 </p><p>Exercises for Chapter 3: Writing and SubmittingSAS Programs</p><p> Exercise 3.1: Computing Mean Height, Weight, and Age </p><p>Overview </p><p>In this exercise, you will use the SAS windowing environment to write and submit a simple SAS program. You will print the SAS program, along with the resulting SAS log and SAS output files. </p><p>Your Assignment </p><p>1. First, you should be sure that all of your windows are clear (that is, you do not have a program in the Editor window, and you do not have output in the Log or Output windows). If you have just opened SAS, all of your windows should be clear. However, if you have already created and submitted SAS programs during this session, then you will have to clear your windows. If this is the case, then select the following (Remember that the Window menu might contain the name that you gave to your SAS program, rather than the word EDITOR, which appears here.): </p><p> Window Editor Edit Clear All Window Log Edit Clear All Window Output Edit Clear All </p></li><li><p>4 Step-by-Step Basic Statistics Using SAS: Exercises </p><p> All three of your windows should now be clear. If it is not already, make sure that the Editor window is the active window. Select the following: </p><p> Window Editor 2. Use the Editor window to write the following program (see the notes </p><p>following the program before you begin): 1 OPTIONS LS=80 PS=60; 2 DATA D1; 3 INPUT SUB_NUM 4 HEIGHT 5 WEIGHT 6 AGE ; 7 DATALINES; 8 1 64 140 20 9 2 68 170 28 10 3 74 210 20 11 4 60 110 32 12 5 64 130 22 13 6 68 170 23 14 7 65 140 22 15 8 65 140 22 16 9 68 160 22 17 ; 18 PROC MEANS DATA=D1; 19 VAR HEIGHT WEIGHT AGE; 20 TITLE1 'type your name here'; 21 RUN; </p><p>Some notes regarding this program: </p><p> Do not type the line numbers that...</p></li></ul>

Recommended

View more >