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 2108. Create one 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 to Expert-Tailored 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

Calculus For Scientists And Engineers Early Transcendentals

Authors: William L Briggs, Bernard Gillett, Bill L Briggs, Lyle Cochran

1st Edition

0321849213, 9780321849212

More Books

Students also viewed these Mathematics questions