Rédigé par des étudiants ayant réussi Disponible immédiatement après paiement Lire en ligne ou en PDF Mauvais document ? Échangez-le gratuitement 4,6 TrustPilot
logo-home
Document preview thumbnail
Aperçu 1 sur 8 pages
Examen

answers mandatory test take-home assignment

Document preview thumbnail
Aperçu 1 sur 8 pages

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 :)

Aperçu du contenu

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

Infos sur le Document

Publié le
5 avril 2025
Nombre de pages
8
Écrit en
2024/2025
Type
Examen
Contient
Questions et réponses
€6,56

Mauvais document ? Échangez-le gratuitement Dans les 14 jours suivant votre achat et avant le téléchargement, vous pouvez choisir un autre document. Vous pouvez simplement dépenser le montant à nouveau.
Rédigé par des étudiants ayant réussi
Disponible immédiatement après paiement
Lire en ligne ou en PDF

Vendu
2
Abonnés
0
Éléments
5
Dernière vente
6 mois de cela



Pourquoi les étudiants choisissent Stuvia

Créé par d'autres étudiants, vérifié par les avis

Une qualité sur laquelle compter : rédigé par des étudiants qui ont réussi et évalué par d'autres qui ont utilisé ce document.

Le document ne convient pas ? Choisis un autre document

Aucun souci ! Tu peux sélectionner directement un autre document qui correspond mieux à ce que tu cherches.

Paye comme tu veux, apprends aussitôt

Aucun abonnement, aucun engagement. Paye selon tes habitudes par carte de crédit et télécharge ton document PDF instantanément.

Student with book image

“Acheté, téléchargé et réussi. C'est aussi simple que ça.”

Alisha Student

Foire aux questions