Skip to Content
Statistical Hypothesis Testing with SAS and R
book

Statistical Hypothesis Testing with SAS and R

by Sonja Kuhnt, Dirk Taeger
March 2014
Intermediate to advanced
306 pages
5h 47m
English
Wiley
Content preview from Statistical Hypothesis Testing with SAS and R

Chapter 2

Tests on the Mean

This chapter contains statistical tests on the mean of a normal population. Frequent questions are if the mean equals a specific value (mostly the null) or if two populations have the same mean or differ by a specific value. Depending on the sampling strategy and on knowledge of the data generation process, the assumptions of known or unknown variances must be distinguished. In most situations the variance is unknown–probably the reason why neither SAS nor R provides procedures to calculate tests for the case of known variances. However, rare situations exist where the variance of the underlying Gaussian distribution is known. We provide some code that demonstrates how these–so-called z-tests–can be calculated. If the variance has to be estimated from the sample, the test statistic distribution changes from standard normal to Student's t-distribution. Here the degrees of freedom vary depending on the specific test problem, for example, in the two population case on whether the variances are assumed to be equal or not. SAS by the procedure proc ttest and R by the function t.test provided convenient ways to calculate these tests. For k-sample tests (F-test) please refer to Chapter 17 which covers ANOVA tests.

2.1 One-sample tests

In this section we deal with the question, if the mean of a normal population differs from a predefined value. Whether the variance of the underlying Gaussian distribution is known or not determines the use of the z-test or the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Nonparametric Hypothesis Testing: Rank and Permutation Methods with Applications in R

Nonparametric Hypothesis Testing: Rank and Permutation Methods with Applications in R

Stefano Bonnini, Livio Corain, Marco Marozzi, Luigi Salmaso

Publisher Resources

ISBN: 9781118762615Purchase book