20. Grad Homework Two: Oswego County and the Chi-square test#

Intro#

In 1940, in Oswego county NY, the New York State Department of Health was dispatched to investigate a quite large outbreak of Staphylococcus aureus among individuals who attended a church dinner.

Staphylococcus aureus is a relatively harmless bacterium that lives on the skin or in the nose of about 30% of humans. However, if Staph aureus moves to other parts of the body then it can cause disease. In the case of Oswego County church goers: this was food poisoning.

(1) The original report from the state#

Please read the original report from the NY State Dept of Health on this outbreak that is linked on Course site. This is called “1940 NY State Report-Oswego County”. Please also read the 1940 Health News report about this outbreak that is also linked on Course site.

Please, briefly, summarize the information in this report and the conclusions that are drawn from this supporting information. The goal is to draw a distinction between what is being report and what is being concluded.

(2) The 2X2 table. The biostatisticians friend.#

Many phenemona that are studied in the context of infectious diseases can be placed into “did an infection occur with this”, “did no infection occur with this”, “did an infeciton occur with that”, and “did no infection occur with that”. im being vague on purpose.

We might be interested in studying whether or not individual who were (and were not infected) is related to their exposure to a specific environemnt, a specific geography, a specific food, a specific bug, and so on and so on. The “this or that” table that is most often used to represent and compute statistics from is the 2X2 table.

Assume that you collected two pieces of information from every individual: (1) whether they were infected by a pathogen or not, and whether they experieced the exposure of interest or not. Then the typical taable used to summarize this information looks like this:

Exposure

No Exposure

Infection

\(x_{ie}\)

\(x_{in}\)

No infection

\(x_{ne}\)

\(x_{nn}\)

where \(x_{ie}\) refers to the number of individuals who were infected and exposed, \(x_{ne}\) refers to the number who were not infected and exposed, and so on.

Using the Health News Report, Please fill in a 2X2 tables for exposure to vanilla icecream vs choclate icecream (not exposed to vanilla) and infection by Staph Aureus, causing illness.

(3) Relative Risk and the Odds Ratio#

The risk of infection, \(p_\text{infected}\), is defined as the probability of selecting an individual from the population who would be infectious. To estimate this (supposed) true probability, we collect a sample and estimate it using the proportion of those infected.

To better understand the role of exposure on risk, we can instead estimate the probability of infection given that the individual was exposed or \(p( \text{infection} | \text{exposed} )\). We can also estimate the probability of infection given that they were not exposed or \(p( \text{infection} | \text{not exposed} )\). These probabilities are called conditional probabilites, and can be written like this.

To estimate these quantities from our sample, we compute the number of those infected divided by only the number of individuals who were exposed, and the number of infected divided by the number of individuals who were not exposed.

There are many ways to compare those risks to one another. A classic approach is to ask “how many more times risky is it to be exposed versus not exposed?”. This is called the relative risk and is formally defined as

(20.1)#\[\begin{align} RR = \frac{p( \text{infection} | \text{exposed} )}{p( \text{infection} | \text{not exposed} )} \end{align}\]

For Oswego county, please estimte the risk of infection, the risk of infection after exposure to vanilla icecream, risk of infection without exposure to vanilla icecream, and the relative risk of exposure to vanilla icecream.

(4) The Expected number of counts#

Our 2X2 table could have been augmented with the total number of those infected, exposed, not infected, not exposed, and the total number of sampled indiviuals: like this

Exposure

No Exposure

Infection

\(x_{ie}\)

\(x_{in}\)

\(x_{i}\)

No infection

\(x_{ne}\)

\(x_{nn}\)

\(x_{n}\)

\(x_{e}\)

\(x_{!e}\)

\(x\)

where \(x_{e}\) is number exposed, \(x_{!e}\) is number not exposed, \(x_{i}\) is number infected and \(x_{n}\) is number not infected, and \(x\) is total sampled.

What do we expect to happen? What do we expect the counts in our 2x2 table to be? The typical approach is to assume that we would expect infection/non-infection to be statistically independent from exposure/non-exposure.

Two events \(A\) and \(B\) are statistically independent when

(20.2)#\[\begin{align} P(A|B=b) = P(A) \end{align}\]

In other words, when the probability of \(A\) doesnt change given some observed value for event $B. This has the common implication that the probability of two events occuring if indpendent is

(20.3)#\[\begin{align} P(A, B) = P(B) P(A|B) = P(B) P(A). \end{align}\]

You multiply each probability individually.

This means then that for every cell in our 2X2 table we have a binomial distribution.
For \(X_{ie} \sim \text{Binomial}( x, p_\text{infection} \times p_{\text{exposed}} )\)
For \(X_{ne} \sim \text{Binomial}( x, p_\text{no infection} \times p_{\text{exposed}} )\)
For \(X_{in} \sim \text{Binomial}( x, p_\text{no infection} \times p_{\text{not exposed}} )\)
For \(X_{nn} \sim \text{Binomial}( x, p_\text{no infection} \times p_{\text{not exposed}} )\)

Please compute the expected number of count in each cell for Oswego county given infections and exposure by vanilla icecream were independent (ie unrelated).

(5) The Chi-square statistic#

The original use of the chi-square statistic was to understand how observed quantities deviated from expected or modeled quantities. Given a set of events \(\mathcal{G} = \{ O_{1}, O_{2}, \cdots, O_{n} \}, \) K. Pearson defined and studied the following statistic

(20.4)#\[\begin{align} \chi^{2} = \sum_{i=1}^{n} \frac{(o_{i} - e_{i})^{2}}{e_{i}} \end{align}\]

where \(o_{i}\) is the observed frequency of event \(i\) and \(e_{i}\) is the expected frequency of event \(i\). The \(\chi^{2}\) ALMOST is a measure of the cumulative (the summation), relative increase/decreases in the observed frequencies versus expected frequencies over all possible events that one could observe. The “almost” part refers to the fact that the numerator of the \(\chi^{2}\) is, well, squared. The rationale fore squaring the difference between observed and expected frequencies is because the interest is in the deviation away from what we expect—regardless of the direction.

Please compute the Chi-square statistic for Oswego county using the observed counts as well as the expected counts from the question you answered above.

Finally, compare this chi-square statistic to the null distribution which is a \(\chi^{2}\) distribution with one degree of freedom. You can get a feel for where your computed stat falls on this null density here = https://stattrek.com/online-calculator/chi-square.

Please describe whether you think exposure to vanilla icecream was related to infection in-light of this chi-square statistic.