R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

#####PREGUNTA 1 ` ###a.What is the point estimate of the population mean year-to-date return for large openendfunds?

data_Q <- c(7.0, 3.2, 1.4, 5.4, 8.5, 2.5, 2.5, 2.5, 1.9, 5.4, 1.6, 1.0, 2.1, 8.5, 4.3, 6.2, 1.5, 1.2, 2.7, 3.8, 2.0, 1.2, 2.6, 4.0, 2.6)

mean_data_Q <- mean(data_Q)
mean_data_Q
## [1] 3.424
#The point estimated of the population mean year-to-date return for large openend funds is 3.424

###b.Given that the population has a normal distribution, develop a 95% confidence #interval for the population mean year-to-date return for open-end funds.

data_Q_size <- length(data_Q)
data_Q_size
## [1] 25
data_Q_sd <- sd(data_Q)
data_Q_sd
## [1] 2.222664
#n=25 , o = 2.222664 , p/2= 0.05/2 , p = 0.025, z(p/2)= 1.96, mean = 3.424

limite_superior = 3.424+(1.96*(2.222664/sqrt(25)))
print(limite_superior)
## [1] 4.295284
limite_inferior = 3.424-(1.96*(2.222664/sqrt(25)))
print(limite_inferior)
## [1] 2.552716
# The 95% confidence interval estimate for the population mean year-to-date return for open-end 
#funds is 2.552716 - 4.295284

#####PREGUNTA 2

###a.Formulate hypotheses for a test to determine whether the sample data support the conclusion. #that the mean monthly Internet bill in the southern state is less than the nationalmean of $32.79.

#H0: μ ≥ USD32.79 / “The mean monthly Internet bill in the southern state is greater than or equal to the national mean”. #Ha: μ < USD32.79 / “The mean monthly Internet bill in the southern state is less than the national mean”.

###b.What is the value of the test statistic? # n=50 , mean = 30.63 , o = 5.60

pop_mean <- 32.79
sample_size <- 50
sample_mean <- 30.63
pop_sd <- 5.60


test_statistic <- (sample_mean - pop_mean) / (pop_sd / sqrt(sample_size))
test_statistic
## [1] -2.727412
#The value of the test statistic is -2.727412

###c. What is the p-value?

deg_freedom <- sample_size - 1
deg_freedom
## [1] 49
p_value <- pt(test_statistic, deg_freedom)
p_value
## [1] 0.004417209
#The P-value is egual to 0.004417209

###d. At α:01, what is your conclusion?

#We know that if P-value ≤ α we reject H0

#Here, P-Value = 0.004417209 and α = 0.01 #so p≤0.01 #Then we reject H0 There is statistical evidence that the mean monthly Internet bill in the southern state is less than the national mean of $32.79 (cf P2, a.).