Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

answers mandatory test take-home assignment

Rating
-
Sold
1
Pages
8
Grade
9-10
Uploaded on
05-04-2025
Written in
2024/2025

This document contains all the answers from the questions in the take-home assignment. 7 questions from the mandatory test were questions from the take-home assignment and the practical 2 notes and 2 questions were surprise questions but similar (with a different dataset). I answered all the questions and used this document, together with the document where I also answered the questions in the practical 2 notes and the R script. I used all three during the exam and got a 9/10 on the test. If you bring these 3 with you to the exam, you'll have already a guaranteed 25% on your final exam! Since I cannot upload all three documents in one, you can always message me and I'll also send you the answers from the practical 2 notes and the R script :)

Show more Read less
Institution
Course

Content preview

Practical 2 : Statistical analysis is R
Before you start :
- Create a folder / directory on your PC where you put all files related to this practical
- Turn this folder into your working directory

setwd ( "C:/wherever your files are")



1. Demo : the independent sample t-test

Data in long format : ozoneLong.txt
Read in the dataset ozoneLong.txt. This small dataset contains measurements of ozone (O3) in
two gardens, labelled A and B.

First explore the data :
- How are the data organized? Check the environment in RStudio, or the str() function.
What do the two variables mean?
- Generate a plot to visualize the ozone concentration in the two gardens

Research question is whether the mean O3 concentration differs between the two gardens.
The most common parametric and non-parametric tests to test this hypothesis are the
independent sample t-test and the Mann-Withney U test, respectively.

Check out the help function for the independent samples t-test in R. With the data in long
format, the most convenient way to carry out the t-test is using the formula interface.

?t.test

Carry out the t-test on the ozoneLong.txt dataset. Interpret the output on the screen :
- Is there a significant difference in mean O3 value between the two gardens
- What is the 95% confidence interval of the difference?

- Yes, because the p-value is less than 0.05 (= 0.001114539)

- [-3.0849115, -0.9150885]

To extract separate elements of the output, store the results of your t-test into an object

myResult <- t.test (… whatever code you used… )

The names() function tells you which elements can be extracted from this results-object

names(myResult)

Use the $ operator to extract the following elements from the results object :
- P-value
- 95% confidence interval of the difference




1

Written for

Institution
Study
Course

Document information

Uploaded on
April 5, 2025
Number of pages
8
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$7.94
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
biomedstudent2324

Get to know the seller

Seller avatar
biomedstudent2324 Universiteit Antwerpen
Follow You need to be logged in order to follow users or courses
Sold
2
Member since
2 year
Number of followers
0
Documents
5
Last sold
1 month ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions