The Student Room Group

stats help plezzzzzzzz

Assignment 2
In the examples below carry out the analyses EITHER (i) using a hand
calculator together with a book of statistical tables (or Excel) OR (ii) using
Minitab.
In the latter case it will not be sucient simply to produce some Minitab
output, and submission of large quantities of output is particularly inappro-
priate. It will be important to abstract from the output the information asked
for in the questions and, where indicated, to comment upon it.
1. A pharmaceutical company wishes to determine whether its new allergy product
(A) is any better at reducing the level of a certain histamine in the blood stream
than its current product (B). Two independent random samples of individuals were
drawn from groups of people using product A and product B, respectively, and their
histamine levels (in mg per cubic litre) were recorded. The data are given below.
Product A: 16.61 15.38 15.70 17.58 16.66 17.13
Product B: 18.66 19.52 16.98 18.19 17.20
(i) State carefully the statistical model that underlies an appropriate analysis,
specifying in particular the unknown parameters. [4]
(ii) Calculate the sample mean (to 2 decimal places) and the sample variance (to 4
decimal places) for both samples and an unbiased pooled estimate of variance
(to 4 decimal places). [4]
(iii) Calculate an estimate of and a 95% con dence interval for the di erence be-
tween the underlying mean levels of histamine resulting from the use of product
A and product B, respectively. [7]
(iv) Stating in terms of the model parameters the hypotheses that you are test-
ing, write down a test statistic to investigate whether the mean level of the
histamine for Product A is less than for Product B. Find the corresponding
p-value and draw conclusions. [10]
1
2. Spiegelhalter and Barnett (2009) in a paper in the journal Signi cance examined
data on the daily numbers of homicides in London for the 1095 days over the three
year period from April 2004 to March 2007. The frequency distribution of the daily
numbers of homicides is given in the table below.
Number of Frequency
homicides
0 713
1 299
2 66
3 16
4 1
 5 0
Table 1: Frequency distribution of daily numbers of homicides
(i) Calculate, to 4 decimal places, the sample mean of the daily number of homi-
cides. [2]
(ii) Carry out a chi-square goodness of t test to test the hypothesis that the
data may be regarded as a random sample from a Poisson distribution. Draw
conclusions. [12]
(iii) As an alternative to the method of part (ii), carry out a dispersion test to test
the same hypothesis. [7]
(iv) Given the above data and hypothesis, and assuming that the underlying pat-
tern of homicides remains unchanged over the subsequent month, state what
is the estimated distribution of the total number of homicides in London for
the month of April 2007. Estimate correct to 2 decimal places the probability
that there are 20 or more homicides in April 2007.
So... you just expect someone to sit here and write out all the answers to your homework for you?

Why don't you start by telling us how far you've managed to get so far, and what you're stuck on
Reply 2
Original post by Chwirkytheappleboy
So... you just expect someone to sit here and write out all the answers to your homework for you?

Why don't you start by telling us how far you've managed to get so far, and what you're stuck on


well yeh...bit of fun for you guys (:
Reply 3
extra stuff for you guys to do but you end up helping me too (:
Doesn't work that way I'm afraid. This forum exists for assistance with learning, not avoiding homework. If you would like a hand with one or two things that you're finding difficult to understand then there are plenty of people who will be happy to help and explain. Posting a list of questions and expecting some sucker to sit there and spoonfeed you the answers however, won't get you anywhere
Reply 5
try the first method and look in the book for guidance.

2i, E(x)=
2ii, find p(x), then find E(x), put into poisson equation, this will give expected values...
Reply 6
Original post by Chwirkytheappleboy
Doesn't work that way I'm afraid. This forum exists for assistance with learning, not avoiding homework. If you would like a hand with one or two things that you're finding difficult to understand then there are plenty of people who will be happy to help and explain. Posting a list of questions and expecting some sucker to sit there and spoonfeed you the answers however, won't get you anywhere


hahaha these are exercises that i need to do just as revision..but i'm not too clever..so if people did them and then like showed how they did it, i'd learn (:
Reply 7
question 1, is chi-squared testing right?
Reply 8
Original post by Minni04
hahaha these are exercises that i need to do just as revision..but i'm not too clever..so if people did them and then like showed how they did it, i'd learn (:


Or you could just learn, while you were actually being taught it. That would work too, because otherwise it's not called revision, where you revise something you should already know.
Reply 9
Original post by Minni04
question 1, is chi-squared testing right?


It's a t-test you need to carry out since you're investigating the difference between two means.

Have you studied this?
Reply 10
Original post by vc94
It's a t-test you need to carry out since you're investigating the difference between two means.

Have you studied this?


umm..i don't believe i have :/ not this year anyway, i don't think..
that's like a 1 tail or 2 tail test? if that's the case, in this quesiton id be doing a 1 tailed test right?
Reply 11
"...investigate whether the mean level of the histamine for Product A is less than for Product B."

This indicates one tailed test.
Reply 12
Original post by vc94
"...investigate whether the mean level of the histamine for Product A is less than for Product B."

This indicates one tailed test.



LOVE IT thank you

can you recommend any good sites that'll help me with this kinda stuff please? :colondollar:
Reply 13
Or maybe we could stop being such douches and actually give the guy/girl some help!

I don't pretend to be the best at this and i'm sure there are more qualified people on here but considering I have my Stats 2 Second year undegrad exam on the 29th I thought id generate a few thought processes for both our sakes.. that may or may not be right... depending on how well im actually going to do in MY exam!

Your initial assumption would probably be that the data are normally distributed and the variances are equal (Homogeneity of variances) i.e the unknown parameters are variances. That opens up a whole load of potential tests. Probably a t test would be best where H1 and Halternative are equal means and means not equal respectively. So in other words if the means arent equal you know one of the products performs better than the other - However to determine which this was would require a post-hoc test of some kind.

The first thing to do is calculate the means for each sample. Take for example Product A: n=6, Sum of times=99.06, Hence Xbar(mean of sample)=Sum/n => 16.51. You then want to find the expected deviation about the mean. To do this you take each value for x from Xbar and square it and sum these values i.e. the first is (16.61-16.51)^2 = .01 second is (15.38-16.51)^2 = 1.2769 and so on and you add these all up and keep this number handy .Do exactly the same for Product B. You now have two means and two expected deviations[i.e. variances], one for A, and one for B.

To calculate the unbiased pooled estimate of the variances you need to sum the two variances and divide by (n1 + n2 - 2). This is because of the unbiased aspect as each variance has denominator (ni-1). So what you have so far as an equation is [Var(x1)+Var(x2)]/[n1+n2-2] Which gives you your pooled unbiased estimate of the variances. Otherwise nown as s^2 or sigma squared.

These are all preliminary steps required to calculate a figure which, when tested against certain critical values found in the t tables, will test the hypothesis to discern whether your Products have the same effect.

The t value itself will now be calculated. Note the ( - 0) in the equation that follows. This is the part that asserts the Null Hypothesis that the means are equal as it provides out t value GIVEN THAT the means are equal i.e. same effect per product [think]. Ok NOW we'll calculate our test statistic! This is the formula t = [(X1bar - X2bar) - 0]/SQRT{(S^2)*[(1/n1)+(1/n2)]} .. Ok i hope that works for you - the colour is just (hopefully) to make it easier to read!

So once you have the value t all you need to do is find a t table, available online or in books or handouts etc and remembering that your degrees of freedom are n1+n2-2.. so here (6+5-2) = 9 You decide on a suitable significance level to test at, say 5%, you find the value of 2.26. You then compare your value of t with that of the critical value of 2.26 and if it is larger you reject the null hypothesis and accept the alternative and conclude that there is EVIDENCE to suggest one product does better than the other. Most likely the one with the lower mean but as i said a post-hoc test would be needed to more confidently confirm this.

To construct a 95% confidence level just google it.. its fairly straightforward compared to the rest of the calculations and i dont have the provisions to show the theory behind it here.. or maybe i do there seems to be a picture symbol but hey this is only my .. what 3rd..4th post?

But anyway thats about all I can be bothered with now. To be honest I can pretty much say with about 99% confidence (no coincidental puns intended) that this is right now that I did a little research aswel. If anyone spots any mistakes please feel free to correct me and please accept my apologies :tongue:

Good luck with the rest I need food and sleep!

Russ0707
Reply 14
Original post by vc94
"...investigate whether the mean level of the histamine for Product A is less than for Product B."

This indicates one tailed test.


I'm not too sure I think the wording makes it sound that way but in reality the test exists to find which is better. If the mean of A is not smaller it performs worse hence B is better than A so you don't know either way. However, the method remains the same for the t test as you test the assumption that theyre the same but either product could be better. The actual "better" product can be confirmed by various methods including just plotting data or as i mention before looking at the mean. These arent numerical but allow for human judgement - The only tool we are born with :tongue:

Good night!
Reply 15
Original post by Russ0707
Or maybe we could stop being such douches and actually give the guy/girl some help!

I don't pretend to be the best at this and i'm sure there are more qualified people on here but considering I have my Stats 2 Second year undegrad exam on the 29th I thought id generate a few thought processes for both our sakes.. that may or may not be right... depending on how well im actually going to do in MY exam!

Your initial assumption would probably be that the data are normally distributed and the variances are equal (Homogeneity of variances) i.e the unknown parameters are variances. That opens up a whole load of potential tests. Probably a t test would be best where H1 and Halternative are equal means and means not equal respectively. So in other words if the means arent equal you know one of the products performs better than the other - However to determine which this was would require a post-hoc test of some kind.

The first thing to do is calculate the means for each sample. Take for example Product A: n=6, Sum of times=99.06, Hence Xbar(mean of sample)=Sum/n => 16.51. You then want to find the expected deviation about the mean. To do this you take each value for x from Xbar and square it and sum these values i.e. the first is (16.61-16.51)^2 = .01 second is (15.38-16.51)^2 = 1.2769 and so on and you add these all up and keep this number handy .Do exactly the same for Product B. You now have two means and two expected deviations[i.e. variances], one for A, and one for B.

To calculate the unbiased pooled estimate of the variances you need to sum the two variances and divide by (n1 + n2 - 2). This is because of the unbiased aspect as each variance has denominator (ni-1). So what you have so far as an equation is [Var(x1)+Var(x2)]/[n1+n2-2] Which gives you your pooled unbiased estimate of the variances. Otherwise nown as s^2 or sigma squared.

These are all preliminary steps required to calculate a figure which, when tested against certain critical values found in the t tables, will test the hypothesis to discern whether your Products have the same effect.

The t value itself will now be calculated. Note the ( - 0) in the equation that follows. This is the part that asserts the Null Hypothesis that the means are equal as it provides out t value GIVEN THAT the means are equal i.e. same effect per product [think]. Ok NOW we'll calculate our test statistic! This is the formula t = [(X1bar - X2bar) - 0]/SQRT{(S^2)*[(1/n1)+(1/n2)]} .. Ok i hope that works for you - the colour is just (hopefully) to make it easier to read!

So once you have the value t all you need to do is find a t table, available online or in books or handouts etc and remembering that your degrees of freedom are n1+n2-2.. so here (6+5-2) = 9 You decide on a suitable significance level to test at, say 5%, you find the value of 2.26. You then compare your value of t with that of the critical value of 2.26 and if it is larger you reject the null hypothesis and accept the alternative and conclude that there is EVIDENCE to suggest one product does better than the other. Most likely the one with the lower mean but as i said a post-hoc test would be needed to more confidently confirm this.

To construct a 95% confidence level just google it.. its fairly straightforward compared to the rest of the calculations and i dont have the provisions to show the theory behind it here.. or maybe i do there seems to be a picture symbol but hey this is only my .. what 3rd..4th post?

But anyway thats about all I can be bothered with now. To be honest I can pretty much say with about 99% confidence (no coincidental puns intended) that this is right now that I did a little research aswel. If anyone spots any mistakes please feel free to correct me and please accept my apologies :tongue:

Good luck with the rest I need food and sleep!

Russ0707




you are incredible..and so so nice! thank you so much!! i'm a girl..and i greatly greatly greatly appreciate your kindness!
Reply 16
Original post by Russ0707
Or maybe we could stop being such douches and actually give the guy/girl some help!

I don't pretend to be the best at this and i'm sure there are more qualified people on here but considering I have my Stats 2 Second year undegrad exam on the 29th I thought id generate a few thought processes for both our sakes.. that may or may not be right... depending on how well im actually going to do in MY exam!

Your initial assumption would probably be that the data are normally distributed and the variances are equal (Homogeneity of variances) i.e the unknown parameters are variances. That opens up a whole load of potential tests. Probably a t test would be best where H1 and Halternative are equal means and means not equal respectively. So in other words if the means arent equal you know one of the products performs better than the other - However to determine which this was would require a post-hoc test of some kind.

The first thing to do is calculate the means for each sample. Take for example Product A: n=6, Sum of times=99.06, Hence Xbar(mean of sample)=Sum/n => 16.51. You then want to find the expected deviation about the mean. To do this you take each value for x from Xbar and square it and sum these values i.e. the first is (16.61-16.51)^2 = .01 second is (15.38-16.51)^2 = 1.2769 and so on and you add these all up and keep this number handy .Do exactly the same for Product B. You now have two means and two expected deviations[i.e. variances], one for A, and one for B.

To calculate the unbiased pooled estimate of the variances you need to sum the two variances and divide by (n1 + n2 - 2). This is because of the unbiased aspect as each variance has denominator (ni-1). So what you have so far as an equation is [Var(x1)+Var(x2)]/[n1+n2-2] Which gives you your pooled unbiased estimate of the variances. Otherwise nown as s^2 or sigma squared.

These are all preliminary steps required to calculate a figure which, when tested against certain critical values found in the t tables, will test the hypothesis to discern whether your Products have the same effect.

The t value itself will now be calculated. Note the ( - 0) in the equation that follows. This is the part that asserts the Null Hypothesis that the means are equal as it provides out t value GIVEN THAT the means are equal i.e. same effect per product [think]. Ok NOW we'll calculate our test statistic! This is the formula t = [(X1bar - X2bar) - 0]/SQRT{(S^2)*[(1/n1)+(1/n2)]} .. Ok i hope that works for you - the colour is just (hopefully) to make it easier to read!

So once you have the value t all you need to do is find a t table, available online or in books or handouts etc and remembering that your degrees of freedom are n1+n2-2.. so here (6+5-2) = 9 You decide on a suitable significance level to test at, say 5%, you find the value of 2.26. You then compare your value of t with that of the critical value of 2.26 and if it is larger you reject the null hypothesis and accept the alternative and conclude that there is EVIDENCE to suggest one product does better than the other. Most likely the one with the lower mean but as i said a post-hoc test would be needed to more confidently confirm this.

To construct a 95% confidence level just google it.. its fairly straightforward compared to the rest of the calculations and i dont have the provisions to show the theory behind it here.. or maybe i do there seems to be a picture symbol but hey this is only my .. what 3rd..4th post?

But anyway thats about all I can be bothered with now. To be honest I can pretty much say with about 99% confidence (no coincidental puns intended) that this is right now that I did a little research aswel. If anyone spots any mistakes please feel free to correct me and please accept my apologies :tongue:

Good luck with the rest I need food and sleep!

Russ0707



are you able to provide more info at all? many many thanks
Reply 17
No. I've had my exam. I don't care now.
Reply 18
Original post by Russ0707
No. I've had my exam. I don't care now.


quite harsh :/
Reply 19
Original post by Minni04
quite harsh :/


Yeah I know and i'm sorry for how I come across but all that info I found was from searching on the internet and with reference to one book I had out at the time! (backed up by my own knowledge of course but trust me that didn't account for a lot)

Honestly if you just search part of the question or type in the name of the topic i.e. standard deviation, confidence intervals, even just statistics and navigate to your topics, you'll find your answers.

Your best bet might just be going to the library and getting a book out as this will lead you through step by step and you can flick back and forwards without thinking "oh where did that come from again" and trawling the internet abyss for aaages :tongue:

Also I said that because I knew I wouldnt be back for a while. Im very unpredictable when it comes to forums and websites etc I dont tend to keep going back to the same ones consistently but who knows maybe this will change!

Good luck!

Quick Reply

Latest