0% found this document useful (0 votes)
11 views3 pages

MATH 1051H R Assignment 2 Guide

The document outlines the instructions for MATH1051H Fall 2020 R Assignment #2, detailing submission requirements, including the use of RStudio and the need for a properly formatted PDF. It emphasizes academic integrity, stating that while discussion is allowed, submissions must be original work. The assignment consists of multiple sections involving data analysis and plotting, with strict deadlines and no acceptance of late submissions.

Uploaded by

BASILE O
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views3 pages

MATH 1051H R Assignment 2 Guide

The document outlines the instructions for MATH1051H Fall 2020 R Assignment #2, detailing submission requirements, including the use of RStudio and the need for a properly formatted PDF. It emphasizes academic integrity, stating that while discussion is allowed, submissions must be original work. The assignment consists of multiple sections involving data analysis and plotting, with strict deadlines and no acceptance of late submissions.

Uploaded by

BASILE O
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MATH1051H Fall 2020

R Assignment #2
Due date: Friday, Oct. 23rd by 5:00 pm
Read these instructions carefully. Failure to comply with these instructions will result in a deduction of
points from your grade.

How do I prepare this assignment for submission?


1. The instructions for this assignment must be completed using RStudio:
a) Create a new R Markdown document. In the file creation interface, like Assignment 1, set the
Author to your full (Blackboard registered) name and student number (e.g., Bob Jones –
0612345) and then set the Title to MATH 1051H – R Assignment 2.

MAKE SURE YOUR NAME AND STUDENT NUMBER APPEAR AS THE AUTHOR,
OR YOU WILL RECEIVE A ZERO
b) Set the Default Output Format to PDF

The assignment must be turned in digitally as a compiled PDF – any other format will not be
graded, and you will receive a zero.
2. Save your R Markdown file to a convenient location (suggested: your default directory) as a R
Markdown file (.Rmd), e.g., 1051H_R_Assign2.Rmd. This name is not important, except that it
must end in Rmd.
3. Immediately knit the file, and ensure it creates a PDF.
4. Once you are done your assignment work, copy the PDF file you have created somewhere different
(e.g., Desktop or Downloads), and rename it to Last_First_StudentNum_R_Assign2.pdf. For
example, using the above fake author, the file would be Jones_Bob_0612345_R_Assign2.pdf. This
file can then be uploaded to Blackboard for grading.

What if I work in a group?


 Discussing the assignment with your friends in the class is allowed, but the version that you submit
must be entirely your own – any copying of another person’s code is a violation of Academic
Integrity. You must complete the Academic Integrity statement section on your submission. Be
aware that failure to comply with that statement will be considered cheating and will be penalized
according to Trent’s Academic Integrity policies.

When and where do I submit my completed assignment?


 Completed assignments must be submitted by the due date and time for assistance. Absolutely no
late submissions will be accepted for this assignment – if you do not have it in on time, you will
receive zero.
 Your assignment must be submitted using the assignment interface link provided on Blackboard. No
other delivery mechanism will be accepted.

What if my .Rmd file does not knit or some R instructions fail?


 Seek out help from the professor or TAs in order to correct these issues – having some instructions
fail can be worked around by using comments, but a failure to knit the file and submit it on time will
result in a zero grade.

What about the WebWork R Assignment 2?

This study source was downloaded by 100000854433047 from [Link] on 10-18-2022 01:10:49 GMT -05:00

[Link]
 The WeBWorK Assignment R Assignment 2 contains data sets and context (e.g., personal numbers)
for some questions. There is no work to be submitted on WeBWorK. The grade is irrelevant, and will
not be counted (it’s only there to make sure the link works).

Questions (each must be created as its own section, e.g., ‘##’ in R Markdown)

1. Academic Integrity

Please copy the following statement as the first question of your submission, under the heading Academic
Integrity.

I am aware that I can discuss the questions on this assignment with others.
However, sharing my files or code with another person (allowing them to copy), or
having someone share their files or code with me (copying), in any way is considered
cheating and will be penalized according to Trent’s Academic Integrity policies.

2. Comparison of Two Numerical Data Sets and Plotting


In this section, you will explore plotting and exploratory analysis on provided data. Create chunks
carefully as you need to in order to ensure the overall flow of this question and response is clean and
organized.

a) Create vectors vec1 and vec2 using the two sets of random numbers from WeBWorK R Assignment
2, Problem 1. You must use the numbers given only to you. This will be checked.

b) Construct a properly labelled histogram for each of your variables. Proper labelling means axes
labels (x and y) and a title. Display the two histograms side by side using mfrow. As there is no
context, feel free to make up the label content (we’re testing your ability to make the labels, not what
you put in them).

c) Construct boxplots of your variables (one plot with two boxplots in the graph). Again, you must
properly label this graph. This is not side-by-side boxplots using mfrow, but two boxplots inside the
same boundary box.

d) Compute any summary statistics you care to (e.g., median, mean, standard deviation), in order to
supplement the figures above for part (e) below in order to complete (e) below.

e) Write a paragraph comparing the distributions of your two variables. Support your description by the
results of (b)-(d). Consider measures of centrality, spread, and skew in your discussion.

3. Binomial Probability
In this section, you will explore the binomial distribution and compute some probabilities. This
section uses WeBWorK R Assignment 2, Questions 2 and 3. Use chunks carefully throughout this
question in order to ensure good word-code grammatical flow to your final result. Feel free to use inline R
code to make your final sentences read nicely.

a) (Simple Binomial Probabilities). Refer to Problem 2 of your WeBWorK R Assignment 2. Find


and display the required probabilities, then explain each of them in words (that is, each
calculation should be followed by a sentence that begins with something like The probability that

This study source was downloaded by 100000854433047 from [Link] on 10-18-2022 01:10:49 GMT -05:00

[Link]
the binomial random variable X with ...).

b) (Complex Binomial Probabilities). Refer to Problem 3 of your WeBWorK R Assignment 2. Find


and display the required probabilities, then explain each of them in words, as you did in part (a).

4. Plotting Binomial Distributions


In this section, you will explore graphical representations of the binomial distribution using bar
charts. We have not covered bar charts in workshop or class, but the syntax is almost identical to
histograms and boxplots, so with careful reading of this question, you should be able to work through the
tricky bits.

a) Create a new chunk, and name it.

b) Consider a binomial distribution with n = 20 and probability of success p = 0.4. Create the vector
of probabilities P[X = x] for x = 0, 1, …, 19, 20, and give it a sensible name.

c) The function to create a barplot is barplot(), and the key arguments are height and [Link],
both vectors – the first (height) generates the height of the bar, while the second ([Link]) puts the
label. Use this function and your knowledge of how the binomial distribution works to make a clear,
organized plot of the discrete probability mass function P[X = x] for the above parameters (i.e., use the
result of part (b)). Ensure you use the axes appropriately, label them, and provide the reader with all
information needed to understand the purpose of the plot (including the parameters!).

d) Using the data from (c), answer the following questions using vector subsetting:
1) P[X = 4]
2) P[X = 19]
3) P[X in {12, 13, 14}]
4) P[X <= 5]
5) P[X > 15]
NOTE: you must use vector subsetting and the results of (b) to compute these (possibly with the
additional use of the sum function) – if you use fresh computations of dbinom or pbinom, you will not
receive any credit.

This study source was downloaded by 100000854433047 from [Link] on 10-18-2022 01:10:49 GMT -05:00

[Link]
Powered by TCPDF ([Link])

Common questions

Powered by AI

In R Assignment 2, binomial probabilities are explored through computation and explanation, offering tangible insights into probabilistic behavior . This approach educates students on applying theoretical concepts to practical scenarios, enhancing their understanding of statistical distributions and probabilistic reasoning .

Creating a barplot involves defining the distribution parameters, generating a probability vector, and properly labeling axes using functions such as barplot(). This task enhances understanding by enabling students to visually analyze discrete probability distributions, reinforcing their grasp of probability mass functions .

The R assignment necessitates the application of coding skills to execute statistical computations and graphical representations, fostering a deeper understanding of statistical principles through practical application . By bridging coding and statistics, students develop critical thinking and problem-solving skills, preparing them for advanced academic and professional challenges .

When discussing assignments with peers, students in MATH1051H must ensure that the final version they submit is entirely their own. They are allowed to discuss concepts but must avoid any form of copying to maintain compliance with academic integrity policies . Failure to adhere can result in penalties for academic misconduct .

Students facing coding errors that affect the knitting process should seek help from professors or TAs to resolve these issues promptly. Comments can be used temporarily to bypass failing instructions, but failure to submit a properly knitted file will result in a zero, making troubleshooting a priority .

Proper labeling of histograms and boxplots, which includes titles and axis labels, is essential for clarity and interpretability. It aids the viewer in understanding the plotted data quickly and supports the narrative of the analysis by clearly communicating the dataset attributes .

Vector creation is crucial in establishing the foundation for numerical comparisons and visualizations such as histograms and boxplots, enabling an accurate exploratory analysis . This process allows students to explore dataset characteristics, assess distributional features, and infer relationships between variables, thus strengthening their analytical skills .

Academic integrity expectations in MATH1051H emphasize individual accountability, prohibiting sharing or copying of files or code . Students must copy an integrity statement acknowledging their understanding that discussing questions is allowed but sharing completed work is not, thus reinforcing ethical conduct and independence in academic work .

The requirement to submit the R assignment in PDF format is crucial as it ensures consistency and accessibility during grading. Non-compliance with the format will lead to a zero grade, highlighting the importance of adhering strictly to submission guidelines . This implicates students to familiarize themselves with R Markdown and the knitting process to avoid technical issues that could result in receiving a zero .

WeBWorK provides specific datasets needed for certain problems in R Assignment 2, ensuring personalized data analysis tasks that are checked for individual completion . This system supports the learning process by providing a structured yet individualized context for practicing data handling and statistical analysis, although the WeBWorK grades are not recorded .

You might also like