Learn fundamental concepts in data analysis and statistical inference, focusing on one and two independent samples.

Loading...

From the course by Johns Hopkins University

Mathematical Biostatistics Boot Camp 2

41 ratings

Learn fundamental concepts in data analysis and statistical inference, focusing on one and two independent samples.

From the lesson

Techniques

This module is a bit of a hodge podge of important techniques. It includes methods for discrete matched pairs data as well as some classical non-parametric methods.

- Brian Caffo, PhDProfessor, Biostatistics

Bloomberg School of Public Health

There's a related idea, in fact numerically equivalent idea,

Â of this so-called attained significance level.

Â Our test statistic was two for H-not mu 30 versus H-a mu different from

Â 30 when we said that n was 100.

Â Okay.

Â So here's our normalized test statistic

Â distribution under the null and

Â our test statistics works out to be two and

Â we said for a one sided test that if we set

Â alpha alpha to be 5%, 5% right,

Â then we got 1.645 there.

Â We set that to be 5%, our 2 was bigger than it.

Â And we would reject the null hypothesis.

Â What if it was .1%?

Â That would be way out here so

Â that there was .1%.

Â If we set alpha to that level, we would fail to reject.

Â What would be the alpha level, for

Â which that you exactly achieve this balance, where if you were to have

Â picked an alpha level larger than it, you would reject, and

Â smaller than it you would fail to reject.

Â I think you can see, if we picked up here, we're going to reject.

Â If we picked down here so that our alpha level was this guy, we would,

Â I'm sorry, if we picked up here, we would fail to reject.

Â And if we picked up here, we would reject.

Â So I think you can see if you were to move it so that the line exactly overlapped

Â with your test statistic, you would be exactly at that point.

Â And then, that alpha level would be the alpha level for

Â which you fail to reject if the alpha level were smaller than it.

Â And you reject if the alpha level were bigger than that.

Â And that guy, is called the attained significance level, kind of for

Â obvious reasons.

Â It's sort of saying what's the smallest significance level

Â I could choose and still reject.

Â So this so you can see this is equivalent to the P value right you can see that by

Â moving these lines around until we get to that perfect alpha that probability of

Â being larger then our test statistic we'll that's also just the P value.

Â So its philosophically different but its the same quantity.

Â Its the same number.

Â So at any rate, there's an interpretation difference between

Â the attain significance level and the p value but

Â there's not a practical difference because they're the same number.

Â One reason I like P values is if someone gives you a P value then the reader or

Â interpreter of your test can perform the hypothesis test of whatever alpha

Â they like.

Â If they reject, if the P value's smaller than alpha and

Â they fail to reject if the P value's larger than alpha.

Â Okay.

Â So that's one reason why I like P values.

Â Is because then the person can calibrate the test however they'd like.

Â If you just tell them I reject or

Â I didn't reject, you haven't given them the same amount of information.

Â For two sided hypothesis test you double the smaller of the two one sided P values.

Â Right so you know if your Z distribution looks like this and you got

Â a test statistic right there here's the P value for that direction hypothesis test.

Â Here's the P value for that direction hypothesis test.

Â You take that guy and double it, and that's your P value.

Â Okay, let's calculate a P value not just for

Â a normal example, which we've already done.

Â Let's calculate a P value for this binomial example.

Â Your friend has 8 children, 7 of which are girls and none are twins.

Â If each gender has an independent 50% probability for each birth,

Â what's the probability of seven or more girls out of eight births?

Â That's the P value, the probability of getting,

Â if we're testing the hypothesis that H naught P equal

Â to .5 versus the Ha P greater than .5 more evidence would be,

Â more of the children being girls and so

Â the probability of getting our observed amount was seven.

Â The probability of getting seven or more, right,

Â is the probability of seven plus the probability of eight.

Â Works out to be about 4%.

Â And then you can just do this with pbinome.

Â Remember, you have to do six because if you do lower.tail equals false

Â it does strictly greater than.

Â So it starts counting at seven when you put in six.

Â But if we were to put in seven it would start counting at eight.

Â Let's do a Poisson example.

Â Suppose that a hospital has an infection rate of ten infections per 100 person days

Â at risk, which is a rate of 10/100 or 0.1, during the last monitoring period.

Â Assume that the infection rate of 5% is an important benchmark.

Â Given the model, could the observed rate?

Â Yeah I shouldn't say 5% given an infection

Â rate of .05 per day at risk is an important benchmark.

Â So given the model,

Â could the observed rate being larger than .05 be attributed to chance?

Â That's what we want to test.

Â So we want to test whether H naught lambda will

Â equal .05, so if lambda was 0.05,

Â then lambda naught times 100 is 5, right?

Â So if the rate is 0.05 per day,

Â then the rate when monitored for 100 days should be 5.

Â So we want to test Ha lambda greater than 0.05 because

Â we're interested in whether our infection rate is higher than this benchmark.

Â So we would do our Poisson probability of

Â getting more than 9 with a rate of 5.

Â We do this, again,

Â more than 9 because it calculates the probability with strictly greater than.

Â So this'll count 10, 11, 12 and so on, okay?

Â And that gives us a probability of 3%.

Â So, if it was a one-sided test, we would reject.

Â If it was a two sided test you double it, right, you double the smaller the of

Â the two one sided hypothesis test.

Â And so that gives you three different settings in which you can

Â calculate P values.

Â We went over a normal P value which is pretty easy.

Â We went over a binomial P value and then we went over Poisson P value.

Â And in each case we did the same thing.

Â We specified our hypotheses, we calculated the probability of

Â getting a test statistic as or more extreme than was actually observed.

Â With this probability was calculated under the null hypothesis.

Â That quantity is a P value.

Â You're going to reject if your P value is small.

Â Smaller than your alpha level, and

Â you're going to fail to reject if your P value is larger than your alpha level.

Â And now that you know what a P value is, you can go and

Â read some of those references and see all the fighting about it.

Â Coursera provides universal access to the worldâ€™s best education,
partnering with top universities and organizations to offer courses online.