Math 422 Mathematical Statistics Spring R Reference

Basics

Distributions

R has many built-in distributions. Each distribution can be accessed using functions with one of 4 prefixes: d, p, q, or r. They refer to density/mass, cumulative probability, quantile, and sampling. Try the following:

The power function problem

In class we looked at using a random sample of size 16 from a Bernoulli population to test the null hypothesis H0: θ = 0.75 against the alternative H1: θ ≠ 0.75. We decided to reject the H0 in favor of H1 if X, the total number of successes in our sample, was any number other than 11, 12, or 13. Your first job is to get R to give you a graph of the power function of this test. Then do the same, but with a different critical region: reject H0 if X isn't 12, 13, or 14. Compare the power functions of the tests. Some sample code to help you get going:

Data input

Linear regression

Analysis of variance

Non-parametric tests

Resources/Links

Office hours

Fisher-stainedglass-gonville-caius

Logan Axon
Department of Mathematics
MSC 2615
Gonzaga University
Spokane, WA 99258
Office: Herak 307A
Phone: 509.313.3897
Email: axon@gonzaga.edu

Last updated 9/24/18