Question

In: Statistics and Probability

You have the following output on the R console: > head(Salaries) Gender Salary 1 Male 43000...

You have the following output on the R console:

> head(Salaries)

Gender Salary

1 Male 43000
2 Female 45000
3 Male 95000
4 Female 88000
5 Male 76000
6 Female 55000

Your manager wants you to write some R code that will test whether there is a difference in the mean salary between Males and Females.

a) How would you use R to store vectors that contain only salaries by gender?

b) If x represents the vector of Male salaries and y represents the vector of Female salaries, what line of code in R tests for a difference in the means?

c) You are not told whether to conduct a one-sided or a two-sided test. Discuss why you might choose one over the other.

d) Suppose you conduct a two-sided test and the p-value is 0.06. What would you tell the manager?

Solutions

Expert Solution

Answer:

NOTE:: I HOPE YOUR HAPPY WITH MY ANSWER....***PLEASE SUPPORT ME WITH YOUR RATING...

***PLEASE GIVE ME "LIKE"...ITS VERY IMPORTANT FOR ME NOW....PLEASE SUPPORT ME ....THANK YOU


Related Solutions

You have the following output on the R console: > head(Salaries) Gender Salary 1 Male 43000...
You have the following output on the R console: > head(Salaries) Gender Salary 1 Male 43000 2 Female 45000 3 Male 95000 4 Female 88000 5 Male 76000 6 Female 55000 Your manager wants you to write some R code that will test whether there is a difference in the mean salary between Males and Females. a) How would you use R to store vectors that contain only salaries by gender? b) If x represents the vector of Male salaries...
(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...
Person Gender Married Age Children Salary Spent 1 Male No 28 1 48600 750 2 Male...
Person Gender Married Age Children Salary Spent 1 Male No 28 1 48600 750 2 Male Yes 35 2 75500 1980 3 Female No 33 2 58900 1820 4 Female Yes 53 1 92200 990 5 Female No 49 1 100700 1990 6 Male Yes 57 1 128900 1900 7 Female Yes 53 1 84900 1000 8 Female No 34 2 62500 2470 9 Male Yes 55 3 142700 2400 10 Male No 33 1 92300 2460 11 Female Yes...
Person Gender Married Age Children Salary Spent 1 Male Yes 35 1 78900 1610 2 Male...
Person Gender Married Age Children Salary Spent 1 Male Yes 35 1 78900 1610 2 Male Yes 53 1 114100 1960 3 Male Yes 36 2 84800 1470 4 Female Yes 51 2 87500 1210 5 Male Yes 39 2 85600 1320 6 Male Yes 66 3 112800 310 7 Male Yes 48 1 87300 1070 8 Male Yes 36 1 73800 2080 9 Female Yes 47 3 68500 900 10 Male Yes 50 1 110200 1950 11 Male No...
You are the head of an R&D department at a major pharmaceutical company. You have five...
You are the head of an R&D department at a major pharmaceutical company. You have five cardiovascular trials to be completed in the next two years. You currently have enough staff to complete the work given no additional changes in project management assignments. Discuss the positive and negative reasons why you would either choose or not choose a CRO to complete the work. Include the types of questions you would need answered to help you make this decision.
You are thinking of purchasing a house. The house costs 300000.You have 43000 in cash...
You are thinking of purchasing a house. The house costs 300000. You have 43000 in cash that you can use as a down payment on the house but you need to borrow the rest of the purchase price. The bank is offering a 30yr mortgage that requires annual payments and has an interest rate of 5 percent per year. What will be the annual payment?
Provide examples of Bannon and Doyle’s male gender elements in our society that you have observed....
Provide examples of Bannon and Doyle’s male gender elements in our society that you have observed. What was your reaction to what you observed?
1. Create the following items in R. Show the R output provided by each object. b...
1. Create the following items in R. Show the R output provided by each object. b The matrix     1 2 3 4 5 6 7 8 9 10 11 12     stored as object mat1. c The matrix     1 5 9 2 6 10 3 7 11 4 8 12     stored as object mat2. d A data frame datfr such that the vector 1 2...
Gender is coded as 0 for Female and 1 for Male. Why and what is this...
Gender is coded as 0 for Female and 1 for Male. Why and what is this called? Perform a multiple regression analysis using Self Esteem (SE) as the dependent variable (Y) and Age, Months Unemployed, Wage at last job, Social Support, and Financial Hardship as independent variables (X).    What is the Multiple Regression Equation?    What is the Coefficient of Multiple Determination? City County State Gender Age Months Unemployed Wage at last job Social support Financial Hardship SE GSE...
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:...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT