Give the probability distributions (just their names and parameters) of the following:
\(\bar{X}\text{~}N(\mu_1,\frac{(\sigma_1)^2}{m})\) Normally distributed
\(\bar{Y}\text{~}N(\mu_1,\frac{(\sigma_1)^2}{n})\) Normally distributed
Multivariate Normal Distribution Property 3: “A linear combination of normally distributed variables are Normal”. We can apply this rule to determine the distribution for \(\bar{X} + \bar{Y}\):
Using the general rule from above as well as Linear Functions of RVs, we can plug in constants \(a_1\) and \(a_2\) respectively to find the associated probability distribution:
n=2 -> \(E({a_1}Y_1+{a_2}Y_2) = {a_1}\mu_1 + {a_2}\mu_2\) …
\(\sigma^2(Y_1+Y_2) = \sigma_1^2 + \sigma_2^2\) (Special Case i. \(Y_1,Y_2\) independent)
\(\sigma^2(Y_1-Y_2) = \sigma_1^2 + \sigma_2^2\) (Special Case ii. \(Y_1,Y_2\) independent)
\((\bar{X} + \bar{Y})\text{~}N(\mu_1 + \mu_2,\frac{(\sigma_1)^2}{m}+\frac{(\sigma_1)^2}{n})\) Normally distributed
This also applies to: \(\bar{X} - \bar{Y}\) since it is a linear combination, only with a coefficient of -1, we get:
\((\bar{X} - \bar{Y})\text{~}N(\mu_1 - \mu_2,\frac{(\sigma_1)^2}{m}+\frac{(\sigma_1)^2}{n})\) Normally distributed
Here we can plug in values of 4 and 8 respectively to find the associated probability distribution:
\((4\bar{X} + 8\bar{Y})\text{~}N(4\mu_1 + 8\mu_2,\frac{16(\sigma_1)^2}{m}+\frac{64(\sigma_1)^2}{n})\) Normally distributed
Given that: \(X_1,...X_m\text{~}N(\mu_1,\sigma_1^2)\) , we can apply \(Z\text{~}N(0,1)\), and squaring this gives us a chi-square distribution: \(Z^2\text{~}\chi_1^2\)
\(\frac{(X_1 - \mu_1)^2}{\sigma_1^2}\text{~}\chi_1^2\) Chi-squared distribution
Use R functions to find the quantiles:
z(0.99), t(0.025; 23), t(0.975; 10), and F (0.95; 6, 10)
Note that these are the lower quantiles. E.g. \(P(Z≤z(\alpha))=\alpha\) where \(Z\text{~}N(0,1)\)
qnorm(0.99)#z
## [1] 2.326348
qt(0.025, 23) #t
## [1] -2.068658
qt(0.975, 10) #t
## [1] 2.228139
qf(0.95, 6, 10) #F
## [1] 3.217175
3. (10 pt) An article in a women’s magazine reported that women who nurse their babies feel warmer and more receptive towards their infants than mothers who bottle feed. This conclusion was based on the following scores from a questionnaire designed to measure warmth and receptivity, given to a random sample of 10 women from each group taken from recent hospital birth records (higher score represents more warmth and reception).
\[ \mu = average\ receptiveness\ toward\ infant\]
\[ \mu_0 = avg\ for\ nursing\ \] \[ \mu_1 = avg\ for\ bottle\ feed\]
Nurse <- c(48.4, 51.5, 45.0, 47.0, 46.9, 47.7, 49.9, 48.5, 45.6, 48.9)
Bottle_feed <- c(42.5, 43.8, 44.5, 47.5, 44.5, 45.6, 43.4, 44.6, 47.1, 45.8)
summary(Nurse)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 45.00 46.92 48.05 47.94 48.80 51.50
sd(Nurse)
## [1] 1.946621
summary(Bottle_feed)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 42.50 43.98 44.55 44.93 45.75 47.50
sd(Bottle_feed)
## [1] 1.581877
(a) State the null and alternative hypotheses and carry out an appropriate test using R. Give the test statistic and the p-value. What do you conclude at significance level \(\alpha\) = 0.05?
Null Hypothesis (\(H_0\)): Women who nurse have the same receptive relationship as those who bottle feed.
Alternative Hypothesis (\(H_1\)): Nursing leads to a more receptive relationship than bottle feeding.
\[ H_0: \mu_1 = \mu_2 \text{ versus } H_1: \mu_1 > \mu_2\] Test Statistic & Critical Region:
Test Statistic: \(Z_0=\frac{\bar{X}-\mu_0}{\sigma/\sqrt{n}}\)
Critical Region: \(z_{obs}>z_{\alpha}\)
Note: \(Z_{0.05}\) = qnorm(0.95) = 1.64
x_barNurse= 47.94 #Nurse
x_barBottle = 44.930
Nurse_sigma = 1.946621 #also equal to sd(Nurse)
## Bottle_sigma = 1.581876523
n=10 #number of data points
a=0.05 #alpha = 0.05
z_obs.Nurse <- (x_barNurse-x_barBottle)/(Nurse_sigma/sqrt(n))
## z_obs.Bottle <-(x_barBottle-x_barNurse)/(Bottle_sigma/sqrt(n))
z_a= qnorm(1-a)
##z_obs.Bottle
z_obs.Nurse
## [1] 4.889732
z_a
## [1] 1.644854
Test Statistic: 4.889732391
Because the observed value of the test statistic is greater than \(Z_{0.05}\) we reject \(H_0\) at 5% level of significance and conclude that Nursing leads to a more receptive relationship than bottle feeding.
## t.test(Nurse, mu=x_barBottle, alternative="less", conf.level=0.95) ##NOT THIS WAY, this is a one sample t-test
#Ignore above dashed line
## using summary statistics and t interval formula
## t_obs=(x_barNurse-44.930)/(Nurse_sigma/sqrt(n)) # = 4.889732391
## t_a=qt(1-.05, n-1) # 1.833112933
## t_obs
## t_a
## pt(t_obs,n-1) # P(T<t_obs)
## -------------------------------------------
t.test(Nurse,Bottle_feed) #Two Sample t-test
##
## Welch Two Sample t-test
##
## data: Nurse and Bottle_feed
## t = 3.7948, df = 17.277, p-value = 0.001412
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 1.338536 4.681464
## sample estimates:
## mean of x mean of y
## 47.94 44.93
Since the p-value is 0.001411829, which is less than 0.05, we reject \(H_0\) at 5% level of significance and conclude that Nursing leads to a more receptive relationship than bottle feeding.
(b) Is this an observational study or controlled experiment? Are there any possible confounding factors? Carefully state in words what the correct conclusion should be.
This is an observational study since the researchers are not assigning who will/will not, nurse or bottle feed their infants; they did not control the independent variable. They are observing the random data from the two groups after it has been collected.
Some confounding factors:
“This conclusion was based on… a questionnaire” which means there is already a weakness in the given data; it could be bias since it’s self reported.
The data came from “An article in a women’s magazine” which means there is a possibility the data was cherry-picked to support a certain idea and/or gain more media attention; in comparison to a professional research study.
The phrasing of " feel warmer and more receptive towards their infants" can be an interpreted in different ways. “Feeling” is based on self-interpretation, in comparison to taking a brain scan to measure Dopamine/Serotonin levels (which could reflect more accurate results).
Lastly, we know very little about the participants in this study, certain subjects could hypothetically have a specific gene for “stronger receptiveness” that could be very rare in the general population.
The summary indicates for this study that on average, women who Nurse (47.94) score higher on average than Bottle feeding (44.93), in feeling more warmth and reception toward infants. Because this is such a small data set, with many possible confounding factors, it would not be sensible to draw any significant conclusions from this study. It would be best to look over more scientific based research before you make a direct conclusion.
End of STAT 325 Hw1: jdk160