Question

In: Statistics and Probability

Q1. The following is some R code followed by output. > set.seed(24); y1 = rnorm(30, 10,...

Q1.

The following is some R code followed by output.

> set.seed(24); y1 = rnorm(30, 10, 5)
> set.seed(34); y2 = rnorm(25, 11, 5)
> t.test(y1,y2, var.equal = TRUE, mu =0, conf.level = 0.90)

Two Sample t-test

data: y1 and y2
t = ? , df = ?, p-value = ?
alternative hypothesis: true difference in means is not equal to 0
90 percent confidence interval:
-3.6460449 0.2757534
sample estimates:
mean of x mean of y
9.154402 10.839548

What is the value of t (t_calc) in the above code?

A. -1.4387

B. 1.4387

C. 2.4387

D. -2.4387

Q2.

Previously we used

set.seed(24); y1 = rnorm(30, 10, 5)
set.seed(34); y2 = rnorm(25, 11, 5)

t.test(y1,y2, var.equal = TRUE, mu =0, conf.level = 0.90)

If the following code is run will the confidence interval be larger or smaller?

set.seed(24); y1 = rnorm(30, 10, 5)
set.seed(34); y2 = rnorm(25, 11, 5)

t.test(y1,y2, var.equal = TRUE, mu =0, conf.level = 0.95)

A. Smaller

B. Larger

Q3.

When conducting Hypothesis tests there are three errors that you can make (T/F)

Q4.

Paired samples are dependent (T/F)

Q5.

A large sample is often when n>=30 (T/F)

Q6.

The NULL hypothesis determines the tailness of the test (T/F)

Solutions

Expert Solution

What is the value of t (t_calc) in the above code?

A. -1.4387

Q2:

95 per cent confidence interval =( -4.0344842, 0.6641927) which is larger than the previous one.

Q3.

When conducting Hypothesis tests there are three errors that you can make (T/F)

No two errors type I and Type II error.

Q4.

Paired samples are dependent (T/F)

TRUE

Q5.

A large sample is often when n>=30 (T/F)

Yes, its the general concept or we can also say misconception. It depends on the underlying population.

Q6.

The NULL hypothesis determines the tailness of the test (T/F)

What is tailness? Its wrong question.


Related Solutions

Use student-t to derive the following paired test set.seed(20) girls_height<- rnorm(50, mean = 160, sd =...
Use student-t to derive the following paired test set.seed(20) girls_height<- rnorm(50, mean = 160, sd = 30) boys_height<- rnorm(50, mean = 172, sd = 30) #------------------------------------------------------------- State the hypothesis for the paired-test of the mean of # girls' height and boys' height. Check the three assumptions before running the student t test # for the samples. You need to write and run the code, and # report the results.
(Be sure to paste the R Console Output and code!!!) Using the following data and R,...
(Be sure to paste the R Console Output and code!!!) Using the following data and R, write a brief paragraph about whether the in-home treatment is equally effective as the out-of-home treatment for two separate groups. Here are the data. The outcome variable is level of anxiety after treatment on a scale from 1 to 10. In-Home Treatment Out-of-Home Treatment 3 7 4 6 1 7 1 8 1 7 3 6 3 5 6 6 5 4 1 2...
student_id=100 set.seed(student_id) Group1=round(rnorm(15,mean=10,sd=4),2) Group2= round(rnorm(12,mean=7,sd=4),2) For this question you are not allowed to use the lm()...
student_id=100 set.seed(student_id) Group1=round(rnorm(15,mean=10,sd=4),2) Group2= round(rnorm(12,mean=7,sd=4),2) For this question you are not allowed to use the lm() command in R or the equivalent of lm() in python or other software. If you want to use a software, only use it as a calculator. So if you are using R, you may only use mean(), sum(), qt() and of course +,-,*,/. (Similar restrictions for Python, excel or others). Consider all the 27 numbers printed under Group1 and Group2 as your y values,...
Use R to complete the following questions. You should include your R code, output and plots...
Use R to complete the following questions. You should include your R code, output and plots in your answer. 1. Two methods of generating a standard normal random variable are: a. Take the sum of 5 uniform (0,1) random numbers and scale to have mean 0 and standard deviation 1. (Use the properties of the uniform distribution to determine the required transformation). b. Generate a standard uniform and then apply inverse cdf function to obtain a normal random variate (Hint:...
Use R to complete the following questions. You should include your R code, output and plots...
Use R to complete the following questions. You should include your R code, output and plots in your answer. 1. Two methods of generating a standard normal random variable are: a. Take the sum of 5 uniform (0,1) random numbers and scale to have mean 0 and standard deviation 1. (Use the properties of the uniform distribution to determine the required transformation). b. Generate a standard uniform and then apply inverse cdf function to obtain a normal random variate (Hint:...
Use R to complete the following questions. You should include your R code, output and plots...
Use R to complete the following questions. You should include your R code, output and plots in your answer. Two methods of generating a standard normal random variable are: a. Take the sum of 5 uniform (0,1) random numbers and scale to have mean 0 and standard deviation 1. (Use the properties of the uniform distribution to determine the required transformation). b. Generate a standard uniform and then apply inverse cdf function to obtain a normal random variate (Hint: use...
Suppose x is 1 and y is 10. What is the output of the following code?...
Suppose x is 1 and y is 10. What is the output of the following code?                         If (x> 1) && ( y <11)                                     Display statement                         else                                     Display nothing 2. Suppose x is 1 and y is 10. What is the output of the following code?                         If (x> 1) || ( y <11)                                     Display statement                         Else                                     Display nothing 3. Write a java program that prints 1 to infinite numbers. 4. The...
PLEASE WRITE IN R CODE. Has to output on R software. (1) The stem length of...
PLEASE WRITE IN R CODE. Has to output on R software. (1) The stem length of soybeans from an experiment are: 20.2, 22.9, 23.3, 20.0, 19.4, 22.0, 22.1, 22.0, 21.9, 21.5, 20.9 a. Create a histogram to visualize the data b. Test "t.test" whether the population mean is different from 22 c. Obtain a 2 sided 98% confidence interval on the true mean using "t.test". d. The researcher, by using "t.test" on a sample size of 11 was assuming that...
Use R for this problem(Code in R). A firm’s personnel officer sampled 36 male and 24...
Use R for this problem(Code in R). A firm’s personnel officer sampled 36 male and 24 female employees investigate allegations that the men in the organization tend to receive hire annual bonuses than the women. Their bonuses (as percentages of their annual salaries) are below. Men 10.4 8.9 11.7 12.0 8.7 9.4 9.8 9.0 9.2 9.7 9.1 8.8 7.9 9.9 10.0 10.1 9.0 11.4 8.7 9.6 9.2 9.7 8.9 9.3 10.4 11.9 9.0 12.0 9.6 9.2 9.9 9.0 9.2 9.4...
Use R for this problem(Code in R). A firm’s personnel officer sampled 36 male and 24...
Use R for this problem(Code in R). A firm’s personnel officer sampled 36 male and 24 female employees investigate allegations that the men in the organization tend to receive hire annual bonuses than the women. Their bonuses (as percentages of their annual salaries) are below. Men 10.4 8.9 11.7 12.0 8.7 9.4 9.8 9.0 9.2 9.7 9.1 8.8 7.9 9.9 10.0 10.1 9.0 11.4 8.7 9.6 9.2 9.7 8.9 9.3 10.4 11.9 9.0 12.0 9.6 9.2 9.9 9.0 9.2 9.4...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT