Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a R studio question What is the difference between the average education level of men and women in your sample? What is the

This is a R studio question

  1. What is the difference between the average education level of men and women in your sample?
  2. What is the difference between the s-squared of education for men in your sample and the s-squared for education for women in your sample?
  3. Test the null hypothesis that men and women have the same average education. Perform a two-sided test, without assuming equal variances. Report the resulting p-value.
  4. Set a seed equal to the number contained in your NetID (ie my NetID is tar310, so I would type set.seed(310)). Create a new variable in your data set called "Sex_Randomized" and randomly assign each observation to be male or female. You can do this in the following way:

"set.seed(310)

My_data$Sex_Randomized = sample(My_Data$Sex, size = length(My_Data$Sex))"

a. Find the difference between the mean of education for those randomly assigned "male" and those randomly assigned "female"

b. Find the difference between the s-squared for the sample of observations randomly assigned male and the sample randomly assigned female

2. Set your seed to 2108 again. Immediately after setting the seed, use loop that does the following things 1,000 times

  • Create random assignment of sex in the same way you did in question 4.
  • Compute the difference in mean of education between those randomly assigned "Male" and "Female" the same way you did in 4a and store that difference in a vector.
  • Compute the difference in s-squared of education between those randomly assigned "Male" and "Female" the same way you did in 4b and store that difference in a vector.

After completing that loop report the following things:

c. What fraction of the random assignments produced a difference in means that was larger in absolute value than the actual difference in mean education between actual men and women in the sample (your answer to 1.)?

d. What fraction of the random assignments produced a difference in s-squareds that was larger in absolute value than the actual difference in s-squareds of education between actual men and women in the sample (your answer to 2.)?

The link to the data:

https://docs.google.com/spreadsheets/d/1XsXxJWg3JlDafIG2ZCc56vBIffb-e0qUnPJpsut9QjU/edit?usp=sharing

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Managerial Accounting Decision Making and Motivating Performance

Authors: Srikant M. Datar, Madhav V. Rajan

1st edition

132816245, 9780132816243, 978-0137024872

Students also viewed these Mathematics questions

Question

How does partnership accounting differ from corporate accounting?

Answered: 1 week ago

Question

Psychological issues associated with officiating/refereeing

Answered: 1 week ago

Question

Write a Python program to check an input number is prime or not.

Answered: 1 week ago

Question

Write a program to check an input year is leap or not.

Answered: 1 week ago

Question

Write short notes on departmentation.

Answered: 1 week ago

Question

when jumping straight disn you can be seriously injured if

Answered: 1 week ago