Hypothesis Testing Unknown Standard Deviation

## Description

To test the claim that of the average length of a great white shark is 20 feet from our sample of 44 sharks, Sage can calculate a $p$-value using the R command `t.test`. We assume that the distribution of the lengths of great white sharks is approximately normal with unknown standard deviation.

To use R in a Sage cell, the language must be set to R. See https://github.com/sagemath/sagecell/blob/master/doc/embedding.rst for details.

## Sage Cell

#### Code

```
sharks <- c(18.7, 16.4, 13.2, 19.2, 12.3, 16.7, 15.8, 16.2, 18.6, 17.8, 14.3, 22.8, 16.4, 16.2, 16.6, 16.8, 15.7, 12.6, 9.4, 13.6, 18.3, 17.8, 18.2, 13.2, 14.6, 13.8, 13.2, 15.7, 15.8, 12.2, 13.6, 19.7, 14.9, 15.2, 15.3, 18.7, 17.6, 14.7, 16.1, 13.2, 12.1, 12.4, 13.5, 16.8)
t.test(sharks, alternative="less", mu=20)
```

## Options

None

## Tags

Primary Tags: Statistics: Hypothesis tests

Secondary Tags: Hypothesis tests: One sample mean - t

## Related Cells

- Hypothesis Testing with Known Standard Deviation using R
- Calculating Confidence Intervals with Known Standard Deviation using R
- Calculating Confidence Intervals with Unknown Standard Deviation using R

## Attribute

Permalink:

Author: T. Judson

Date: 19 Jul 2017 16:04

Submitted by: Tom Judson