# Statistical Hypothesis Testing with SAS and R

ISBN: 978-1-119-95021-9
306 pages
March 2014

## Description

A comprehensive guide to statistical hypothesis testing with examples in SAS and R

When analyzing datasets the following questions often arise:

Is there a short hand procedure for a statistical test available in SAS or R?

If so, how do I use it?
If not, how do I program the test myself?

This book answers these questions and provides an overview of the most common
statistical test problems in a comprehensive way, making it easy to find and perform
an appropriate statistical test.

A general summary of statistical test theory is presented, along with a basic
description for each test, including the necessary prerequisites, assumptions, the
formal test problem and the test statistic. Examples in both SAS and R are provided,
along with program code to perform the test, resulting output and remarks
explaining the necessary program parameters.

Key features:
• Provides examples in both SAS and R for each test presented.
• Looks at the most common statistical tests, displayed in a clear and easy to follow way.
• Supported by a supplementary website http://www.d-taeger.de featuring example
program code.

Academics, practitioners and SAS and R programmers will find this book a valuable
resource. Students using SAS and R will also find it an excellent choice for reference
and data analysis.

See More

Preface xiii

Part I INTRODUCTION 1

1 Statistical hypothesis testing 3

1.1 Theory of statistical hypothesis testing 3

1.2 Testing statistical hypothesis with SAS and R 4

1.3 Presentation of the statistical tests 13

References 15

Part II NORMAL DISTRIBUTION 17

2 Tests on the mean 19

2.1 One-sample tests 19

2.2 Two-sample tests 23

References 35

3 Tests on the variance 36

3.1 One-sample tests 36

3.2 Two-sample tests 41

References 47

Part III BINOMIAL DISTRIBUTION 49

4 Tests on proportions 51

4.1 One-sample tests 51

4.2 Two-sample tests 55

4.3 K-sample tests 62

References 64

Part IV OTHER DISTRIBUTIONS 65

5 Poisson distribution 67

5.1 Tests on the Poisson parameter 67

References 75

6 Exponential distribution 76

6.1 Test on the parameter of an exponential distribution 76

Reference 78

Part V CORRELATION 79

7 Tests on association 81

7.1 One-sample tests 81

7.2 Two-sample tests 94

References 98

Part VI NONPARAMETRIC TESTS 99

8 Tests on location 101

8.1 One-sample tests 101

8.2 Two-sample tests 110

8.3 K-sample tests 116

References 118

9 Tests on scale difference 120

9.1 Two-sample tests 120

References 131

10 Other tests 132

10.1 Two-sample tests 132

References 135

Part VII GOODNESS-OF-FIT TESTS 137

11 Tests on normality 139

11.1 Tests based on the EDF 139

11.2 Tests not based on the EDF 148

References 152

12 Tests on other distributions 154

12.1 Tests based on the EDF 154

12.2 Tests not based on the EDF 164

References 166

Part VIII TESTS ON RANDOMNESS 167

13 Tests on randomness 169

13.1 Run tests 169

13.2 Successive difference tests 178

References 185

Part IX TESTS ON CONTINGENCY TABLES 187

14 Tests on contingency tables 189

14.1 Tests on independence and homogeneity 189

14.2 Tests on agreement and symmetry 197

14.3 Test on risk measures 205

References 214

Part X TESTS ON OUTLIERS 217

15 Tests on outliers 219

15.1 Outliers tests for Gaussian null distribution 219

15.2 Outlier tests for other null distributions 229

References 235

Part XI TESTS IN REGRESSION ANALYSIS 237

16 Tests in regression analysis 239

16.1 Simple linear regression 239

16.2 Multiple linear regression 246

References 252

17 Tests in variance analysis 253

17.1 Analysis of variance 253

17.2 Tests for homogeneity of variances 258

References 263

Appendix A Datasets 264

Appendix B Tables 271

Glossary 284

Index 287

See More

## Author Information

Dirk Taeger, Institute for Prevention and Occupational Medicine of the German Social
Accident Insurance, Institute of the Ruhr-Universität Bochum (IPA), Bochum, Germany

Sonja Kuhnt, Department of Computer Science, Dortmund University of Applied Sciences
and Arts, Dortmund, Germany

See More