Академический Документы
Профессиональный Документы
Культура Документы
HarvardX: PH207x Healt h in Num bers: Quant it at ive Met hods in Clinical & Public Healt h Resear ch m yraj14 (/ dashboard)
Coursew ar e (/ courses/ HarvardX/ PH207x/ 2012_Fall/ cour sew are) Text book (/ cour ses/ Harvar dX/ PH207x/ 2012_Fall/ book / 0/ ) Dat a Set s (/ cour ses/ Harvar dX/ PH207x/ 2012_Fall/ dat aset s/ ) Wik i (/ courses/ Har vardX/ PH207x/ 2012_Fall/ course_w ik i) FAQ (/ courses/ HarvardX/ PH207x/ 2012_Fall/ faq/ )
Discussion (/ cour ses/ HarvardX/ PH207x/ 2012_Fall/ discussion/ forum ) Pr ogress (/ courses/ HarvardX/ PH207x/ 2012_Fall/ progress)
subset .dta - Dataset for Question (/stat ic/cont ent-har var d-id270x/ handouts/subset.b8242231a970.dt a)
HYPOTHESIS TESTING
Click on the link above to obtain a subsam ple of the BMI at baseline am ong 20 Fram ingham participants in the dataset subset .dta. Assum e that BMI at baseline is nor m ally distr ibuted, but the variance of BMI at baseline is unknown.
1. Construct a 90% confidence inter val for BMI at baseline am ong Fram ingham par ticipants using the subsam ple. 24.78895
02,56673
27.87805
05,656. 3
2. Using the confidence int er val in question 1 above, would you reject the null hypothesis t hat BMI am ong part icipant s with diabet es is equal t o 27 (versus the alternative that BMI is not equal to 27) at the 90% confidence level? (Hint : does the confidence int erval cont ain 27?) Yes No
3. For norm ally distribut ed random var iables with known variance, t he width of t he 90% pr edictive interval for t he sam ple m ean is equal to the width of a 90% confidence interval for the population m ean. Tr ue False
4. For the test descr ibed in quest ion 2 above, what is: the value of t est stat istic -0.7462
. ,5240
the distribution of the test statistic under the null hypothesis
Standard nor m al distr ibution t-dist ribution with 20 degrees of freedom t-dist ribution with 19 degrees of freedom
. ,2425
5. Using the confidence int er val above, we conclude that BMI at baseline in the Fram ingham cohort is not differ ent from 27 at t he ` Tr ue False
; . ,/
level of significance.
6. If an out lier is disproport ionately influencing your hypothesis test , you should always thr ow it out . Tr ue False
Hide Discussion
N ew Post
Quest i on 1
Abhijeet safai (/ cour ses/ Harvar dX/ PH207x/ 2012_Fall/ discussion/ forum / users/ 359904) 2 months ago
I calculated . sum bmi1 and then di 26.3335 - invnormal(0.95)* 3.99473 and di 26.3335 + invnormal(0.95)* 3.99473. The answers are 19.762754 and 32.904246 respectively. When I checked the answers , they were wrong and when I saw the answer s, they ar e nothing but the r age of t test at 90% CI. I under stood fr om this that t test can be used to constr uct 90% confidence interval. I would like to know as why these results are not similar to what we get fr om di 26.3335 - invnormal(0.95)* 3.99473 command? Thanks Is it so because the sample is less than 30?
Pepper pou rr i (/ cou r ses/ Har vardX/ PH207x/ 2012_Fall/ discu ssion / foru m / u ser s/ 402368)
months ago
I used the same command as you, i.e. mean - invnor mal(0.95)* SD and got the same answers as you. They wer e of course incorr ect. Could someone please explain? Isn't it the same method as the pr evious questions? I.e. getting the 90%CI? And no, they aren't the same as the 95%CI of the t-test. I added sqrt(20) but don't get the corr ect answers too. Kindly help.
when the sample standard deviation is not known, as stated in the question, we use "invttail(19, 0.05)
when the sample standard deviation is not known, as stated in the question, we use "invttail(19, 0.05) not invnormal that is used when sample SD is known.
posted 2 months ago by Kendra81 (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/692068)
r eading thr ough other comments i see another way to ar rive at the answer.
posted 2 months ago by Kendra81 (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/692068)
Since you are checking the value for sub population you should also use sqrt of sub population in your for mula
posted 2 months ago by Artimehta (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/300213)
Add a comment...
COMMUNITY TA
Su san Au st (/ cou r ses/ Har vardX/ PH207x/ 2012_Fall/ discu ssion / foru m / u ser s/ 629320)
months ago
You are using a sample and constructing a confidence inter val using the sample mean, so you should use standard error. You don't know the population sigma, so you use t. cii 20 26.3335 3.99473, level(90)
Thanks a lot!
posted 2 months ago by Abhijeetsafai (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/359904)
sigma of the sample is the sigma / sqrt(20) for the calculation by hand
posted 2 months ago by GianniTee (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/643919)
If you wer e using bmi1, then it sounds like you have altered the original data - probably in the homework exercises when bmi1 was categorised. Get a clean data set from this website. Don't save the data when you exit Stata or , if you really want to keep variables you have created, save as a different name. That way your original data will remain uncorrupted.
posted 2 months ago by SusanAust (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/629320) COMMUNITY TA
Thanks, susan
posted 2 months ago by ValeriaFAP (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/649470)
Thank you! Finally got it! Simpler way is just to use the drop down menu, since we have a dataset available.
posted 2 months ago by Pepperpourri (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/402368)
Some like the menus, some don't. I rarely use them, so my comments here are usually related to the
command syntax.
posted 2 months ago by SusanAust (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/629320) COMMUNITY TA
cii with your syntax generated the error message 'varlist not allowed'. Is some additional syntax r equired? Thanks
posted 2 months ago by howardbarkan (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/172618)
No, if you cut and paste the command it should wor k. I just tried, and it was fine.
posted 2 months ago by SusanAust (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/629320) COMMUNITY TA
I see cii is confidence inter val calculator . I spotted the syntax problem: need a comma following the std dev. Thanks for wor king this late in the eve (or early in the AM). I'm on the West coast with other r esponsibilities which often make it difficult for spend much time on this course until late in the week. Your responses are dependably helpful.
posted 2 months ago by howardbarkan (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/172618)
Add a comment...
Su bm it
Hide discussion
Q5
Rob_Biggar (/ cour ses/ Harvar dX/ PH207x/ 2012_Fall/ discussion/ forum / users/ 273013) 2 months ago
18
If my P-value>alpha, then shouldn't you NOT REJ ECT the null hypothesis and hence mew=27 and q5 is true? anyone?
su zan n eph am (/ cou r ses/ Har vardX/ PH207x/ 2012_Fall/ discu ssion / f oru m / u ser s/ 492947)
2 months ago
I thought this one was tricky too, but perhaps they are tr ying to drive home the point that saying "I can't reject the hypothesis that the mean BMI is 27 among diabetic participants" is not the same as "I conclude that the mean BMI is 27 among diabetic participants."
I am thinking that maybe we can conclude only the subsample not the entir e Framingham cohort (because we didn't test the entir e cohort we tested only the subsample) may be the reason
posted 2 months ago by J ittima (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/181664)
I think q.5 says "we conclude bmi is NOT DIffERENT" from 27." which in other words is saying BMI IS 27. That is ACCEPTING the null hypothesis, which we can never do. The best we can say is that we cannot reject the hypothesis that bmi is 27. I am only putting differently what suzannepham has already said, i think.
posted 2 months ago by apchaphekar (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/581036)
we conclude that BMI at baseline in the Fr amingham cohort is not different from 27 A confidence inter val is based around the mean. So it is the average BMI at baseline that the confidence interval is referencing. As written it is saying that every BMI = 27.
posted 2 months ago by SusanAust (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/629320) COMMUNITY TA
So adding just two words: "Using the confidence interval above, we conclude that t he m ean BMI at baseline in the Framingham cohor t is not different from 27 at the =0.1 level of significance" would make it corr ect, r ight?
posted 2 months ago by wadjur (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/642502)
You would still have to phr ase it as a hypothesis test. A confidence interval is equivalent to a two tail test at that level of significance. So you would say that you fail to reject the null hypothesis that the aver age BMI at baseline in the Fr amingham study is 27 at the 0.1 level of significance. (You would also include the units of measurement. 27 what?)
posted 2 months ago by SusanAust (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/629320) COMMUNITY TA
Great insights as usual SusanAust. Why can't we accept the null hypothesis anyway?
posted 2 months ago by CarlosAyala (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/559206)
So this is a message about the corr ect reporting of a result with non significant p value. As I understand, the r ules are: 1- It should be reported as a hypothesis. 2- It should be repor ted in negative sense "e.g. we failed to r eject the null hypothesis". 3- It should include the level of significance (alpha). Accordingly Q5 is false because it didn't satisfy the first rule. Am I cor rect?
posted 2 months ago by AhmedTaher (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/595230)
Add a comment...
Sim on _D_M (/ cou r ses/ Har vardX/ PH207x/ 2012_Fall / discu ssion / f oru m / u ser s/ 559024) 2
months ago
I think the wording is ambiguous as you can read it 2 ways: 1. the Framingham cohort is 'not different' from 27 at the =0.1 level of significance 2. the Framingham cohort is not 'different from 27 at the =0.1 level of significance' The former is false while the latter is true.
Add a comment...
COMMUNITY TA
Su san Au st (/ cou r ses/ Har vardX/ PH207x/ 2012_Fall/ discu ssion / foru m / u ser s/ 629320)
months ago
months ago
My take on it was that there was a small but meaningful wor d missing fr om the statement. Recall what a confidence inter val is based on.
Add a comment...
2 months ago
srin ivasm u r k i2001 (/ cou r ses/ Har vardX/ PH207x/ 2012_Fall/ discu ssion / f oru m / u ser s/ 364614)
we need to read the review sheet twice or thrice befor e we answer the above questions. the review sheet is quite explanatory in solving the problems.
Add a comment...
Su bm it
Hide discussion
p value Q4
66 (/ courses/ HarvardX/ PH207x/ 2012_Fall/ discussion/ for um / users/ 461939) 2 months ago my t statistcs is 7.0904 & p value is .0000 and the answers are wrong but with that my question no is false which is correct somebody please explain
An aAlbu ja (/ cou rses/ Harvar dX/ PH207x/ 2012_Fall/ di scu ssion / for u m / u sers/ 653651) 2
months ago
How did you calculate this? I had completely different answers (they are corr ect). I used stata as explained in the tutorial. Maybe you should notice that you are using a hypothesized mean of 27 and a CI of 90, also confir m that you do not have any value in the if option. I hope this helps.
i have a same problem, i write keep bmi1 sample 20,count ttest bmi1 == 27, level(90) my t stat and p value are wrong? what's wrong?please somebody can explain me.
posted 2 months ago by catherinelarapide (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/657908)
cather ine, you don't take your own sample. You use the data set linked at the top of the question.
posted 2 months ago by SusanAust (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/629320) COMMUNITY TA
cather ine have you downloaded subset.dta which is given above the question and do the ttest comman for the given data
posted 2 months ago by valar (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/396859)
Add a comment...
COMMUNITY TA
Su san Au st (/ cou r ses/ Har vardX/ PH207x/ 2012_Fall/ discu ssion / foru m / u ser s/ 629320)
months ago
Add a comment...
Su bm it
Hide discussion
Q4 P val ue 1.000?
Horst Praut zsch (/ courses/ HarvardX/ PH207x/ 2012_Fall/ discussion/ forum / user s/ 588640) 2 months ago
i did: . ttest bmi1 == 26.3335, level(90) the ci is correct, but the p value not (stata displays: Pr(| T| >| t| )=1.000). what is my mistake?
pdy (/ cou rses/ HarvardX/ PH207x/ 2012_Fall/ discu ssion / for u m / u ser s/ 673511) 2 months ago
ttest bmi1 =27, level(90) not 26.6.. they ar e asking that mu=27, (not mu=26.6, that is the sample mean)form the sample. Hypothesise that mu=27.
they are asking that mu=27, not mu=26.6 for m the sample.
posted 2 months ago by pdy (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/673511)
Add a comment...
Su bm it
Hide discussion
Note that the statement of question 2 is ambiguous. "Using the confidence interval in question 1 above, would you reject the null hypothesis...
View discussion
COMMUNITY TA
Su san Au st (/ cou r ses/ Har vardX/ PH207x/ 2012_Fall/ discu ssion / foru m / u ser s/ 629320)
months ago
Not sure what you are asking her e. What are you using 0.05 for?
sorry = 0.1
posted 2 months ago by anamatos (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/405941)
Add a comment...
Su bm it
Hide discussion
Q4
acbhui (/ courses/ HarvardX/ PH207x/ 2012_Fall/ discussion/ forum / user s/ 248286) 2 months ago Guys, what is the definition of test statistic?
Rolu s (/ cou r ses/ Har vardX/ PH207x/ 2012_Fall / discu ssion / f oru m / u ser s/ 239548) 2 months ago
It is the t value in the test r esults in state. In any case is not 27
Add a comment...
Lem i (/ cou r ses/ Har vardX/ PH207x/ 2012_Fall/ discu ssion / foru m / u ser s/ 345670)
that's t in the ttest in stata
2 months ago
Add a comment...
ju an crespo (/ cou rses/ Harvar dX/ PH207x/ 2012_Fall/ discu ssion / for u m / u sers/ 762030) 2
months ago
in this case, 27
Add a comment...
Su bm it
Hide discussion
14
af t r yn a (/ cou rses/ Harvar dX/ PH207x/ 2012_Fall/ discu ssion / foru m / u sers/ 577964) 2 months
ago
Add a comment...
Lyu daO (/ cou rses/ HarvardX/ PH207x/ 2012_Fall/ discu ssion / for u m / u ser s/ 671452) 2 months
ago
I agr ee too
Add a comment...
br u n ofed (/ cou rses/ Harvar dX/ PH207x/ 2012_Fall/ discu ssion / foru m / u sers/ 476923) 2
months ago
question 2 and question 5 basically ask the same thing: if I cannot reject the null hypothesis that bmi is equal to 27 at the 90% level (Q2), then bmi is not different from 27 at the alpha=0.1 level (Q5), so I believe cor rect answer to Q5 is "True"
Add a comment...
Su bm it
Hide discussion
Cal cul at or : cii n m ean sd, level(95) vs Funct ion: ci var list , l evel(95)
Wyone (/ cour ses/ Harvar dX/ PH207x/ 2012_Fall/ discussion/ forum / users/ 806826) 16 days ago Hi, may I know what is the difference between the 2 formulae given in the handout? Calculator: cii n mean sd, level(95) Function: ci varlist, level(95) I keyed in both commands and got the same results: . ci bmi, level(90) Variable | bmi1 | Obs 20 Mean 26.3335 Std. Err. .8932487 [90% Conf. Interval] 24.78895 27.87805
Variable | |
Obs 20
Mean 26.3335
What is the differ ence between { ci bmi, level(90) } and { cii 20 26.3335 3.99473, level(90) } ? Also, it says in the notes: Calculator: cii n mean sd, level(95) Function: ci var list, level(95) What do Calculator and Function actually mean? They gave the same results. If they are the same, why do we need 2 commands that do the same thing?
blizsqu ar ed (/ cou rses/ Harvar dX/ PH207x/ 2012_Fall/ discu ssion / for u m / u sers/ 642688) 16
days ago
One uses variables in a database; the other allows you to calculate the confidence interval, etc., assuming you have the input numbers. cii does not access a database.
Add a comment...
Wyon e (/ cou r ses/ Har vardX/ PH207x/ 2012_Fall/ discu ssion / f oru m / u ser s/ 806826) 15 days ago
Ah OK great, thank you so much!!!
Add a comment...
Su bm it
Hide discussion
To t he st aff
10
10
lvazdela (/ courses/ Har vardX/ PH207x/ 2012_Fall/ discussion/ forum / user s/ 708460) 2 months ago Please clarify why the correct response in Q5 is "false". p is hughly bigger than alpha, so we conclude that the mean of BMI in the Framingham...
View discussion
k am ran ali (/ cou rses/ Harvar dX/ PH207x/ 2012_Fall/ di scu ssion / for u m / u sers/ 190582) 2
months ago
Welcome.
posted 2 months ago by Artimehta (/courses/HarvardX/PH207x/2012_Fall/discussion/forum/users/300213)
Add a comment...
Su bm it
Hide discussion
value. But it seems negative. I sincer ely appreciate if someone could teach me why t-statistics is negative here. I may misunderstand the concept of t-statistics.
Jest 01 (/ cou rses/ Harvar dX/ PH207x/ 2012_Fall/ discu ssion / for u m / u sers/ 656314) 2 months ago
I have the same doubt.
Add a comment...
n ik k iX (/ cou rses/ Harvar dX/ PH207x/ 2012_Fall/ discu ssion / for u m / u sers/ 384570) 2 months
ago
tr y this. The sign of the test statistic is determined by the numer ator of the equation t = (xbar - MuNaught)/ (std dev/ sqrt(n) ) so - if we concentrate on the numerator: X-bar (the sample mean) minus Mu naught (the mean you are trying to accept/r eject in your hypothesis) in this case, the sample mean is 26.3335 and the hypothesis we are testing is that the mean is 27... so whenever the mean of the sample has a value that is LESS THAN the mean you ar e testing in your Null Hypothesis, the test statistic will have a negative value. hope this makes it clearer?
Add a comment...
Su bm it
Hide discussion
Q2 help
Yoju (/ courses/ HarvardX/ PH207x/ 2012_Fall/ discussion/ forum / users/ 263540) 2 months ago Could somebody please explain the concept for Q2. It seems like i am not understanding the wordings in the question? Anybody can explain that...
View discussion
Q.5
Kat t im ani (/ courses/ HarvardX/ PH207x/ 2012_Fall/ discussion/ for um / users/ 541148) 2 months ago 1. 2. 3. 4. 5. 6. we are chosing one sample t test, at alpha=0.10 and pr edictive confidence interval of sample mean to be 90% null hypothesis: mu=muspecified, (here in this m u specified = 27) alternate hypotheis: mu not equal to 27 t test done t=-0.7462, with df=19, p value=0.4647 sample mean is no different from the population mean, that fail to reject null hypothesis Using the confidence interval above (24.785, 27.874), we conclude that BMI at baseline in the Framingham cohort is not differ ent fr om 27 at the =0.1 level of significance.
edileepa (/ cou r ses/ Har vardX/ PH207x/ 2012_Fall/ discu ssion / for u m / u ser s/ 658040) 2 months
ago
I think we should not mixup the two different appr oaches, first appr oach is based on CI where as second approach is based hypothesis testing, and should not use CI r esults to interpr et/explain significance at alpha in hypothesis testing.
in hypothesis testing.
Add a comment...
Su bm it
Hide discussion
m pau lich en k o (/ cou r ses/ Har var dX/ PH207x/ 2012_Fall/ discu ssi on / foru m / u sers/ 432926)
about a month ago
wiat...how come i got a mean of 26? adding the total divided by 20 observatiosn??? how is it 27 mean?
Add a comment...
Su bm it
Hide discussion
bal sm art 2002 (/ cou rses/ HarvardX/ PH207x/ 2012_Fall/ discu ssion / for u m / u ser s/ 680317) 2
months ago
Add a comment...
Su bm it
Hide discussion
Dear Susan
drjuansanjuan (/ cour ses/ HarvardX/ PH207x/ 2012_Fall/ discussion/ forum / users/ 595829) 2 months ago
I have a question. i did drop all the missing bmi1, but i don't know if ther e's any "set seed" to mark fir st, because i ran: preserve drop bmi1==. sample 20, count ttest bmi1 = 27, level(90) and my results ar e different... Could you please help me?
COMMUNITY TA
Su san Au st (/ cou r ses/ Har vardX/ PH207x/ 2012_Fall/ discu ssion / foru m / u ser s/ 629320)
months ago
For this par ticular question you are given the subset of data. It is linked at the top of the page. So if you took
For this par ticular question you are given the subset of data. It is linked at the top of the page. So if you took your own r andom sample, you will get different results.
Add a comment...
Su bm it
Hide discussion
About (/about)
J obs (/jobs)