library(tidyverse)
library(openintro)
library(infer)Midterm 2 Take Home Paper
Directions: In this project, you will apply various statistical procedures covered in our course. If you have not done so before, make sure to load the necessary R packages, including openintro and tidyverse, by running the library() functions given above.
The code chunk below will help you load your data. You do not have to use all of the datasets. Examine each of them and feel free to choose one based on your interest. Remember that some datasets can only be used for comparing proportions or conducting a paired sample t-test.
data("yawn")
data("possum")
data("lizard_run")
data("lego_population")
data("hsb2")
data("fheights")
data("exam_grades")To see the details related to these datasets, examine the links below. Use the .txt files when using the applets.
- yawn
- possum
- lizard_run
- lego_population
- hsb2 - High School and Beyond Survey
- fheights - Female Heights
- exam_grades
Part 1: Getting to Know Your Dataset
Question 1.1: Use the glimpse() function to introduce the dataset(s) you will use for this project.
# Type your code hereType your answer here.
Question 1.2: Identify the types of variables in the dataset (categorical, binary categorical, or quantitative).
Type your answer here.
Question 1.3: Choose a quantitative variable and visualize its distribution. Describe the graph.
# Type your code hereType your answer here.
Question 1.4: Choose a categorical variable and create a visualization. Describe the graph.
# Type your code hereType your answer here.
Question 1.5: Examine the dataset carefully. Do you see any potential outliers? How would you handle them if you do?
Type your answer here.
Part 2: Statistical Inference
In this section, you will perform inferential statistical tests using your dataset.
One Sample t-test
In this section, you are expected to write a case study based on your dataset. Choose a quantitative variable and conduct a one-sample t-test. Show your work.
Type your case study here.
Question 2.1: What is the research question of this study?
Type your answer here.
Question 2.2: What type of variable do we have in this study?
Type your answer here.
Question 2.3: List the assumptions required for this test and check the assumption of normality for this study. Interpret the assumptions overall.
- Random Sampling: Explain here.
- Independence of Observations: Explain here.
- Normal Distribution: Explain here.
# Type your code here to check normalityInterpret your output here.
Question 2.4: Write out the null and alternative hypotheses in words, in the context of this study.
Type your answer here.
Question 2.5: Compute the test statistic (standardized statistic) and explain what you see in the output.
# Type your code hereType your answer here.
Question 2.6: Draw a conclusion and write a conclusion statement. Provide the context clearly.
Type your answer here.
Independent Samples t-test
In this section, you are expected to write a case study based on your dataset. Choose one quantitative variable and one categorical variable (with two categories) and conduct an independent samples t-test. Show your work.
Question 3.1: What is the research question of this study?
Type your answer here.
Question 3.2: What type of variables do we have in this study?
Type your answer here.
Question 3.3: List the assumptions required for this test and check the assumption of normality for this study. Interpret the assumptions overall.
- Random Sampling: Explain here.
- Independence of Observations: Explain here.
- Normal Distribution: Explain here.
# Type your code here to check normalityInterpret the assumptions and explain your reasoning.
Question 3.4: Write out the null and alternative hypotheses in words, in the context of this study.
Type your answer here.
Question 3.5: Compute the test statistic (standardized statistic) and explain what you see in the output.
# Type your code hereType your answer here.
Question 3.6: Draw a conclusion and write a conclusion statement. Provide the context clearly.
Type your answer here.
Paired Sample t-test
Use this document and Matched Pairs and select the dataset “Run Distance”. Complete this part by using the applet and print that too.