# Segment 15 Sanmit Narvekar

Jump to navigation Jump to search

## Segment 15

#### To Calculate

1. In slide 4, we used "posterior predictive p-value" to get the respective p-values 1.0e-13, .01, .12, and .0013. What if we had mistakenly just used the maximum likelihood estimate r=0.003, instead of integrating over r? What p-values would we have obtained?

Here is the code for calculating the pvalues using the MLE estimate for r (the procedure is similar to that on slide 3):

```
r = 0.003;

% T11
t11 = sum(binopdf(5:37, 9*37,r))

% T2
t2 = sum(binopdf(23:37,10*37, r))

% T13 -- Remember we only have 12 of the 37 values
t13 = sum(binopdf(4:12, 10*12, r))

% T5
t5 = sum(binopdf(3:37, 10*37, r))

```

The calculated pvalues are:

```
t11 =

0.0036                  % 0.01 using posterior predictive

t2 =

7.8210e-23           % 1e10^-13 using posterior predictive

t13 =

5.0435e-04           % 0.0013 using posterior predictive

t5 =

0.1013                  % 0.12 using posterior predictive

```

#### To Think About

1. Can you think of a unified way to handle the Towne family problem (estimating r and deciding which family members are likely "non-paternal") without trimming the data? We'll show one such method in a later segment, but there is likely more than one possible good answer.

Perhaps you could weigh outlier data less while forming your estimate of R.