# Two Basic Inference Procedures

## Estimating a Parameter

### The general method

1. Make sure mathematical assumptions made are reasonable.
2. Get a good sample.
3. Compute statistic from sample.
4. Determine the quality of that statistic as an estimate for the paramter.
• confidence level
• confidence interval, margin of error
Result: Able to fill in blanks in a statement like the following:

We estimate the paramter to be between ______ and ______,
and this interval will contain the true value of the parameter
approximately _______% of the times we use this method.

### Method applied to estimating a proportion

1. For this method to be valid, certain assumptions must be met:
1. The parameter must exist and be fixed for the population of interest.
2. The sample must be good enough. (The theory is based on a simple random sample, but if another sampling method is used that provides a good approximation to a simple random sample, then the results will still be reliable.)
3. The sample must be large enough. The larger the sample, the more accurate the results. In any case, their should be at least 5 individuals with each value.
4. The population must be large enough. The population should be at least 10 times the size of the sample.
1. Compute p_hat (the proportion of the sample with the trait of interest).

p_hat = (number with trait) / (total number in sample)

2. The sampling distribution is approximately normal with a mean equal to p (the true population proportion) and a standard deviation deviation equal to the square root of (p(1-p)/n), where n is the sample size.

If we don't know p (and usually we don't, that is what we are trying to estimate after all) we have two choices:

• Use square root of (.5)(.5)/n.

This will always be as large or larger that the true value. But if p is fairly small, this will cause us to give a less precise result than would be possible with method (b).

• Use square root of p_hat(1-p_hat)/n.

With reasonable sample sizes, p and p_hat will be close, so this will be a good estimate of the actual standard deviation.

3. We can fill in the blanks by using our knowledge of normal distributions.

## Hypothesis Testing

1. Make sure mathematical assumptions made are reasonable.

2. Determine the null hypothesis and the alternative hypothesis.

3. Collect data.

4. Compute test statistic.

The test statstic is a measures how well the data seem to support the null hypothesis. For 2-way tables, we use the Chi-squared statistic. For hypothesis about sample proportions we use the Z statistic.

5. Determine likelihood of such an extreme test statistic if null hypothesis is true (p-value).

This is done by using a table, a computer, or simulation to approximate the p-value from the value of the test statistic

6. Make a decision.

The decision depends on both the p-value and the level of confidence required. If the p-value is sufficiently small, then we say we "reject the null hypothesis" because if it were true, our data would be very "unusual".

Note the statistical evidence is never absolute proof, but it does provide a measure of its level of cerainty (the p-value or confidence level)