Docsity

Stat 305 Lab 3: Hypothesis Testing for Differences in Means and Variance, Lab Reports of Statistics

Toggle sidebar
bg1
Stat 305 - Lab 3
Topics covered: Hypothesis testing for comparing two groups.
1. Data:
Download the data sets from http://www.owlnet.rice.edu/~stat305/projects.
You will use data sets calciumbp.dta and laborforce.txt
In all of the following, we assume that the data is normally distributed.
2. Hypothesis testing for difference of 2 means, two-sample t-test
Does increasing calcium intake reduce blood pressure?
Observational studies suggest that there is a link, and that it is strongest in African-
American men. Twenty-one African-American men participated in an experiment to test
this hypothesis. Ten of the men took a calcium supplement for 12 weeks while the
remaining 11 men received a placebo. Researchers measured the blood pressure of each
subject before and after the 12-week period. The experiment was double-blind.
Using:
calciumbp.dta (stata data file)
This dataset shows the results of a randomized comparative experiment to investigate the
effect of calcium on blood pressure in African-American men. A treatment group of 10
men received a calcium supplement for 12 weeks, and a control group of 11 men received
a placebo during the same period. All subjects had their blood pressure tested before and
after the 12-week period.
begincal = beginning blood pressure of men who took calcium
endcal = ending blood pressure of men who took calcium
beginplacebo = beginning blood pressure of men who took placebo
endcal = ending blood pressure of men who took placebo
Create new datasets: changecal and changeplacebo to denote the change in blood pressure
of the two groups:
changecal = endcal - begincal and changeplacebo = endplacebo - beginplacebo.
* A negative value for changecal or endplacebo will indicate decrease in blood pressure.
In STATA:
Under 'Data / Create or Change Variables / Create new variable':
In 'Generate variable:' enter name of variable (e.g. changecal)
In 'Contents': enter the formula for calculating the new variable (e.g.
begincal - endcal)
Click 'OK'
Q1* Conduct a test for the following hypothesis:
pf3
pf4

Partial preview of the text

Download Stat 305 Lab 3: Hypothesis Testing for Differences in Means and Variance and more Lab Reports Statistics in PDF only on Docsity!

Stat 305 - Lab 3

Topics covered: Hypothesis testing for comparing two groups.

  1. Data:

Download the data sets from http://www.owlnet.rice.edu/~stat305/projects. You will use data sets calciumbp.dta and laborforce.txt

In all of the following, we assume that the data is normally distributed.

  1. Hypothesis testing for difference of 2 means, two-sample t-test

Does increasing calcium intake reduce blood pressure? Observational studies suggest that there is a link, and that it is strongest in African- American men. Twenty-one African-American men participated in an experiment to test this hypothesis. Ten of the men took a calcium supplement for 12 weeks while the remaining 11 men received a placebo. Researchers measured the blood pressure of each subject before and after the 12-week period. The experiment was double-blind.

Using: calciumbp.dta (stata data file) This dataset shows the results of a randomized comparative experiment to investigate the effect of calcium on blood pressure in African-American men. A treatment group of 10 men received a calcium supplement for 12 weeks, and a control group of 11 men received a placebo during the same period. All subjects had their blood pressure tested before and after the 12-week period.

begincal = beginning blood pressure of men who took calcium endcal = ending blood pressure of men who took calcium beginplacebo = beginning blood pressure of men who took placebo endcal = ending blood pressure of men who took placebo

Create new datasets: changecal and changeplacebo to denote the change in blood pressure of the two groups: changecal = endcal - begincal and changeplacebo = endplacebo - beginplacebo.

  • A negative value for changecal or endplacebo will indicate decrease in blood pressure.

In STATA: Under 'Data / Create or Change Variables / Create new variable': In 'Generate variable:' enter name of variable (e.g. changecal) In 'Contents': enter the formula for calculating the new variable (e.g. begincal - endcal) Click 'OK'

Q1* Conduct a test for the following hypothesis:

Find the sample mean and sample standard deviation for changecal and changeplacebo.

Q2* Conduct a test for the following hypothesis (do not assume equal variance): H 0 : μ calcium = μ placebo (equivalently μ calcium - μ placebo = 0)

H (^) a : μ calcium < μ placebo (equivalently μ calcium - μ placebo < 0) (i.e. that taking calcium causes lower average blood pressure)

Let μ placebo denote the mean of changeplacebo and μ calcium denote the mean of changecal.

a) Test difference for confidence level 90% (α =.10) b) for confidence level 95% (α =.05)

In each case, state the p-value, whether or not H 0 is rejected.

Under 'Statistics/ Summaries, tables, & tests / Classical Tests of Hypothesis / two-sample mean comparison test' in 'Main' tab: In first variable, enter 'changecal'; enter 'changeplacebo' in second variable. (NOTE: The order is important here.) Since the observations are unpaired, check this option. Also check the option for unequal variances. Specify the confidence level

Q3* Based on the hypothesis tests, do you think that there is evidence that calcium causes lower blood pressure in African-American men? Explain.

  1. Hypothesis Testing for difference of variance between two groups.

Q4* Conduct a test for the following hypothesis:

H 0 : σ calcium = σ placebo (equivalently σ calcium - σ placebo = 0)

H (^) a : σ calcium ≠ σ placebo (equivalently σ calcium - σ placebo ≠ 0)

Let σ placebo denote the variance of changeplace bo and σ calcium denote the variance of changecal.

Test difference for confidence level 95% (α =.05)

State the p-value, whether or not H 0 is rejected.

Let μ 1968 denote the mean of the LFPR in 1968 and μ 1972 denote the mean of the LFPR in 1972. Test for confidence level 95% (α =.05) State the form of H 0 and Ha in terms of μ 1968 and μ 1972 , the p-value, and whether or not H 0 is rejected.

Under 'Statistics/ Summaries, tables, & tests / Classical Tests of Hypothesis / two-sample mean comparison test' in 'Main' tab: In first variable, enter the appropriate variables (NOTE: The order is important here.) Since the observations are paired, uncheck this option. Specify the confidence level

Q8* Based on the results of the hypothesis test, can we assume a change in the LFPR? If so, in what direction?