Compare two means

Hi there,
I am VERY new in the R world... need a lot of help!
I am working on a problem where I got the mean for two separate variables within one dataset. Now, I am trying to figure out how can I compare those and how to do hypotheses testing.

The dataset contains daily closing stock prices for Google and Amazon from 8/22/2017 to 8/22/2018. When we examine stock prices (or other financial assets) we often transform them into a (simple) return series. The return series are computed by the formula: (present price/past price) - 1. The dataset contains both stock prices and return series.

  1. Based on the return series, can we claim that the mean Amazon return series is higher than that of Google?

a. What would be an appropriate test of the claim above? Explain.
b. Write the null and alternative hypotheses.

Hi @kadri55,

you could see my post about t-tests in another context here: How to analyase ranking data in R please?. In your case you would need to make sure you do a one-sided test which is not the default setting, but you can set this easily - just follow the documentation for the function t.test.

Please be aware of the site's homework policy:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.