Introduction to Lab 7

John Fieberg

Goals

  • Work through examples illustrating how to use the normal and t-distributions for statistical inference.

  • Learn how to construct confidence intervals and perform tests using the (t.test(), prop.test()) functions in R.

  • Compare simulation and formula-based methods of inference.

  • Understand that a test for a difference in (means, proportions) may be significant even when confidence intervals for the individual groups overlap.

  • Compute confidence intervals and tests for paired data using t.test()

Data for today’s lab

  1. Tinbergen’s egg removal experiments (difference in proportions)
  1. Contaminant assays: Common Goldeneye and Hooded Merganser eggs (difference in means)
  1. Blackbird data (from pre-lab; paired difference in means)

Tinbergren’s Egg Removal Experiments

Picture of a gull.

Black-headed Gull removing an egg shell from its nest. Shells are often dropped between a few inches and a hundred yards from the nest.

Why do this just after hatching, when the young birds need warmth and protection from predators? This behavior must have considerable survival value.

Possible Explanations

  • The sharp edges of broken eggs could injure chicks (poultry breeders “know this danger well”)
  • The shell could slip over an unhatched egg, trapping the chick in a double shell.
  • Eggs shells could interfere with brooding.
  • The organic material left behind in the shell could breed bacteria or molds
  • The eggshells could attract the attention of predators.

Experiments to explore predation risk

Category Not.predated Predated Total
Eggs without shell nearby 47 13 60
Eggs with shell nearby 13 39 52
Total 60 52 112

Let \(p_{shell}\) = the proportion of eggs with a shell nearby that are predated

Let \(p_{no shell}\) = the proportion of eggs without a shell nearby that are predated

\(H_0: p_{shell} = p_{no shell}\) versus \(H_a: p_{shell} \ne p_{no shell}\)

Inference: difference in proportions

Compare methods:

  • Using formula sheet
  • Using simulation (I’ve provided the code)
  • using prop.test

Common Goldeney and Hooded Mergansers

A photo of a goldeneye duck

A goldeneye duck.

A photo of a merganser duck

A merganser duck.

Mike Zicus, MN DNR (and UMN alumn) measured eggshell thickness and egg-contaminant levels (e.g., DDT, PCBs, mercury) in common goldeneye and hooded merganser eggs throughout MN in 1981 and again in 2003-2004.

Difference in means

How has eggshell thickness and Hg concentration changed (DDT banned in early 1070’s)?

Compare methods:

  • Using formula sheet
  • Using simulation (I’ve provided the code)
  • using t.test

Bonus problems

  • Confidence interval overlap versus a test for a difference in means

  • Paired data (from pre-lab)

Make sure to look at answer key if you do not get to these sections!