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


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?
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...
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...
Group Statistics gender N Mean Std. Deviation Std. Error Mean salary male 47 32442.23 3117.026 454.665...
Group Statistics gender N Mean Std. Deviation Std. Error Mean salary male 47 32442.23 3117.026 454.665 female 47 33920.57 3824.284 557.829 Independent Samples Test Levene's Test for Equality of Variances t-test for Equality of Means F Sig. t df Sig. (2-tailed) Mean Difference Std. Error Difference 95% Confidence Interval of the Difference Lower Upper salary Equal variances assumed .964 .329 -2.054 92 .043 -1478.340 719.648 -2907.624 -49.057 Equal variances not assumed -2.054 88.404 .043 -1478.340 719.648 -2908.399 -48.282 Here we...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT