library(learnr) library(learnSTATS) data(basics_data) library(faux) basics_data <- sim_df(basics_data, sample(100:200, 1), between = "where") knitr::opts_chunk$set(echo = FALSE)
In this example, we will expand your R skills into some basic level statistics. You will explore hypothesis testing, as well as calculate frequency distributions, z-scores, and more. The learning objectives include:
The following videos are provided as a lecture for the class material. In this case, there is not a technical assignment for the Introduction to Data Analytics material. The lectures are provided here as part of the flow for the course. You can view the lecture notes within R using vignette("Introduction-Data-Analytics", "learnSTATS")
. You can skip these pages if you are in class to go on to the assignment.
These videos are part of the materials for this learnr assignment. You can view the lecture notes within R using vignette("Basic-Stats-Concepts", "learnSTATS")
.
In this next section, you will answer questions using the R code blocks provided. Be sure to use the solution
option to see the answer if you need it!
Please enter your name for submission. If you do not need to submit, just type anything you'd like in this box.
question_text( "Student Name:", answer("Your Name", correct = TRUE), incorrect = "Thanks!", try_again_button = "Modify your answer", allow_retry = TRUE )
Title: Offshore outsourcing: Its advantages, disadvantages, and effect on the American economy
Abstract: The United States has trained some of the world's best computer programmers and technology experts. Despite all of this training, many businesses do not have a full understanding of information technology. As the importance of technology in the business world grows, many companies are wasting money on extensive technology projects. When problems arise, they expect that further investment will solve these issues. To prevent such problems, many companies have begun to outsource these functions in an effort to reduce costs and improve performance. The majority of these outsourced information technology and call center jobs are going to low-wage countries, such as India and China where English-speaking college graduates are being hired at substantially lower wages. The purpose of this study is to evaluate the positive and negative aspects of offshore outsourcing with a focus on the outsourcing markets in India and China, arguably the two most popular destinations for outsourcers. The cost savings associated with offshore outsourcing will be evaluated in relation to the security risks and other weakness of offshore outsourcing. In addition, an analysis of the number of jobs sent overseas versus the number of jobs created in the United States will be used to assess the effects that outsourcing is having on the American economy and job market. Finally, the value of jobs lost from the American economy will be compared to the value of jobs created. The goal of these analyses is to create a clear picture of this increasingly popular business strategy.
Answer the following questions about the abstract above:
question_text( "What is a potential hypothesis of the researchers?", answer("Many correct answers.", correct = TRUE), incorrect = "There are many right answers for this question, except copying this output!", try_again_button = "Modify your answer", allow_retry = TRUE )
question_text( "What is one of the independent variables?", answer("There are likely three independent variables.", correct = TRUE), incorrect = "Potentially you could identify country as a variable (there are more right answers as well)!", try_again_button = "Modify your answer", allow_retry = TRUE )
question_text( "What type of variable is the independent variable?", answer("Categorical", correct = TRUE), incorrect = "More than likely, the independent variable is categorical.", try_again_button = "Modify your answer", allow_retry = TRUE )
question_text( "What is one of the dependent variables?", answer("Several potential variables can be listed.", correct = TRUE), incorrect = "Several potential variables can be listed, but one example is cost savings.", try_again_button = "Modify your answer", allow_retry = TRUE )
question_text( "What type of variable is the dependent variable?", answer("Generally, our dependent variables are continuous.", correct = TRUE), incorrect = "Generally, our dependent variables are continuous.", try_again_button = "Modify your answer", allow_retry = TRUE )
question_text( "What type of research design is the experiment and why?", answer("Correlational because you didn't manipulate the variables.", correct = TRUE), incorrect = "Hint: research designs are correlational or experimental.", try_again_button = "Modify your answer", allow_retry = TRUE )
question_text( "What type of data collection did the researchers use?", answer("Repeated measures", correct = TRUE), incorrect = "Hint: data collection is repeated measures or between subjects.", try_again_button = "Modify your answer", allow_retry = TRUE )
The basics_data
dataframe has been loaded for you. In the dataframe, you are provided with the following columns:
names(basics_data)
Create a frequency table the places the jobs were outsourced to using the table()
function.
table(basics_data$where)
Create histograms of the two types of cost savings using hist()
and include the breaks
argument to help create a readable histogram. Try breaks = 15
. Note, there should be two histograms!
hist(basics_data$cost, breaks = 15) hist(basics_data$cost2, breaks = 15)
Calculate the skewness and kurtosis values for your cost savings using the psych
library and the describe()
function. Remember, you have to load the library first!
library(psych) describe(basics_data$cost) describe(basics_data$cost2)
Hit the > button on the right of the describe output to see more information about each variable to answer these questions.
question_text( "Which of these two variables is more normal?", answer("cost depends on randomization", correct = TRUE), incorrect = "Hint: Skew and Excess Kurtosis are closest to zero when normal.", try_again_button = "Modify your answer", allow_retry = TRUE )
question_text( "Which of these two cost saving solutions is more effective?", answer("cost", correct = TRUE), incorrect = "Hint: You want cost savings to be the higher number. Saving more money is better!", try_again_button = "Modify your answer", allow_retry = TRUE )
question_text( "Which of these two cost saving solutions is more variable?", answer("Depends on your interpretation.", correct = TRUE), incorrect = "Hint: You could use a measure of dispersion to make this choice.", try_again_button = "Modify your answer", allow_retry = TRUE )
On this page, you will create the submission for your instructor (if necessary). Please copy this report and submit using a Word document or paste into the text window of your submission page. Click "Generate Submission" to get your work!
encoder_logic()
encoder_ui()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.