Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Stab57 utsc

20/03/2021 Client: saad24vbs Deadline: 7 Days

Assignment 5

Due Thursday October 20 at 11:59pm on Blackboard

As before, the questions without solutions are an assignment: you need to do these questions yourself and hand them in (instructions below).

The assignment is due on the date shown above. An assignment handed in after the deadline is late, and may or may not be accepted (see course outline). My solutions to the assignment questions will be available when everyone has handed in their assignment.

You are reminded that work handed in with your name on it must be entirely your own work.

Assignments are to be handed in on Blackboard. Instructions are at http://www.utsc.utoronto.ca/

~butler/c32/blackboard-assgt-howto.html, in case you forgot since last week. Markers’ comments and grades will be available on Blackboard as well.

1. I said before that obtaining a ggplot normal quantile plot with a line is not automatic, but let’s explore how it might be done, since the ideas are not difficult ones.

(a) This question assesses the normality of a chi-squared distribution. (Don’t worry if you’ve never heard of the chi-squared distribution before. It’s the one that is used to obtain P-values for any of the various chi-squared tests. If you’ve done any of those you might have used a chi-squared table. If not, it’s fine.) R has a function rchisq that generates random values from this distribution. It takes two things as input, the number of random values to generate, and the number of degrees of freedom. A chi-squared distribution with large degrees of freedom is more normal-like, in the same way that a t distribution with large degrees of freedom is indistinguishable from a normal distribution.

Generate 50 random values from a chi-squared distribution with 5 degrees of freedom, and save them into a data frame (containing just that one column of values).

Solution: First, I need to make sure that my answer is reproducible (so I can talk about it), plus I need the “tidyverse” for later:

set.seed(457299)

library(tidyverse)

## Loading tidyverse: ggplot2

## Loading tidyverse: tibble

## Loading tidyverse: tidyr

## Loading tidyverse: readr

## Loading tidyverse: purrr

## Loading tidyverse: dplyr

## Conflicts with tidy packages ----------------------------------------------

## filter(): dplyr, stats

## lag(): dplyr, stats

1

http://www.utsc.utoronto.ca/~butler/c32/blackboard-assgt-howto.html
http://www.utsc.utoronto.ca/~butler/c32/blackboard-assgt-howto.html
The obvious way is to do it in two steps:

z=rchisq(50,5)

df=data.frame(z)

summary(df)

## z

## Min. : 0.9193

## 1st Qu.: 2.6898

## Median : 4.9005

## Mean : 5.9352

## 3rd Qu.: 8.1580

## Max. :20.2781

You can also do it in one shot:

df=data.frame(z=rchisq(50,5))

summary(df)

## z

## Min. : 0.7468

## 1st Qu.: 3.0280

## Median : 4.3933

## Mean : 4.7460

## 3rd Qu.: 5.9517

## Max. :18.5339

The variable names are of no consequence, but it will be less confusing to avoid x and y because of what is coming up.

(A chi-squared distribution has mean equal to its degrees of freedom, so the mean should be 5. That looks OK here.)

(b) On a normal quantile plot such as the one produced by qqnorm-qqline, the line goes through the first and third quartiles of the data (on the y-axis) and the first and third quartiles of a standard normal distribution (on the x-axis). Calculate these, calling them y and x respectively.

Solution: For the data:

y=quantile(df$z,c(0.25,0.75))

y

## 25% 75%

## 3.028047 5.951711

For the standard normal distribution, the function qnorm produces the values of z that have the given probabilities of being less than them (the “inverse CDF”, if you will, or “reading the table backwards”):

x=qnorm(c(0.25,0.75))

x

## [1] -0.6744898 0.6744898

(c) Work out the slope and intercept of the straight line joining these two points. (The slope is rise over run; the intercept is whatever it has to be to make a line with the slope you just calculated pass through one of the points; it doesn’t matter which one.) See if you can find a lazy way of

Page 2

getting the slope and intercept, and justify why it works.

Solution: Let’s suppose the line has the formula y = a+ bx. We first get b as rise over run:

b=(y[2]-y[1])/(x[2]-x[1])

b

## 75%

## 2.167315

then we stop and think a bit. Pick one of the points, say the first one (and use that for x and y); we just found b, so the only unknown thing is a. A tiny amount of algebra produces a = y − bx:

a=y[1]-b*x[1]

a

## 25%

## 4.489879

I said there was a lazy way. For that, note that the regression line through two points must actually go through those two points (so that the sum of squares of residuals can be and is zero).1 In R, lm does regression, or you could even do it by hand if you were determined enough:

yy=lm(y~x)

summary(yy)

##

## Call:

## lm(formula = y ~ x)

##

## Residuals:

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Finance Master
ECFX Market
Top Quality Assignments
Innovative Writer
Financial Assignments
Professor Smith
Writer Writer Name Offer Chat
Finance Master

ONLINE

Finance Master

I am known as Unrivaled Quality, Written to Standard, providing Plagiarism-free woork, and Always on Time

$40 Chat With Writer
ECFX Market

ONLINE

ECFX Market

Hello, I an ranked top 10 freelancers in academic and contents writing. I can write and updated your personal statement with great quality and free of plagiarism

$22 Chat With Writer
Top Quality Assignments

ONLINE

Top Quality Assignments

Hello, I an ranked top 10 freelancers in academic and contents writing. I can write and updated your personal statement with great quality and free of plagiarism

$20 Chat With Writer
Innovative Writer

ONLINE

Innovative Writer

Give me a chance, i will do this with my best efforts

$28 Chat With Writer
Financial Assignments

ONLINE

Financial Assignments

I have read your project details. I can do this within your deadline.

$29 Chat With Writer
Professor Smith

ONLINE

Professor Smith

You can award me any time as I am ready to start your project curiously. Waiting for your positive response. Thank you!

$40 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Introduction to criminal justice 9th edition bohm pdf - Forklift traffic management plan template - Dr irshad ali barkati - Journal entry - The apostate jack london - Urban outfitters social responsibility - Babette's feast character analysis - Joint application development example - Answer the follwing questions in 600 to 700 words - Write a five paragraph essay analyzing the influence frankenstein - Y vt 1 2gt 2 - As 3958.1 free download - Noted dutch painter crossword clue - By the waters of babylon characters - What is q point - Cost transferred to finished goods - Bbc digital media initiative revisited case study - Ls dyna material manual - Assignment 1 network infrastructure design diagramming - Tokugawa shogunate lesson plan - Flowers for algernon progress report 13 summary - True rms meter definition - Cbus super abn number - Imperialism political cartoons explained - Voltmeter and ammeter lab report - Validity of data collection tools - The system unit is a case that contains electronic components - Give me liberty chapter 1 review questions answers - Ghost soldiers hampton sides sparknotes - Product Description - Help- Develop a Computer/Internet Security Policy - Evidence-based practice in informatics - Manager judgment is an important method for staffing in - Bunsen burner flame test - Types of african masks and their meanings - Dice game program in java - Assignment 2 - Gilwell halls plymouth address - Victoria hospital kirkcaldy consultants - 13 waliki court lara - Hydrogen burns with a pop sound - Starbucks after schultz how to sustain a competitive advantage - Module 4 Writing work - Keller graduate school of management houston - Best buy renew blue presentation - Shropshire council dropped kerb - Colin palmer african diaspora - Colgate palmolive promotion strategy - 4s week 14 assignment IA - Three schools of bargaining ethics - Data Analytics - Organise and complete daily work activities book - ENG 225 Introduction to Film - Can a pmo accelerate the implementation process discussion - Gabrielle walter clay american idol - Harley davidson ethnocentric company - Desert willow growth rate - A charge nurse on the pediatric unit is making assignments - Issa fitness nutrition exam section 1 - Ethical Perspectives - Continuous quality improvement worksheet hcs - Week 5 - Boy's life by robert mccammon sparknotes - What's next in this sequence 4 8 16 32 64 - Runton road car park cromer - Ccb ppc 9690 deereco rd - Include the revised introduction and review of literature, along with the body. - Teaching children to read 7th edition - Do you believe Artificial Intelligence or Machine Learning is the future of cybersecurity? Explain why or why not. - A cell phone plan has a basic charge - Setting of taming of the shrew - What is an enterpreneur - Geography - Starbucks barista training program - Siemens vl630 mccb catalogue - Febco 825y test ports - Hobsons bay library catalogue - Case study resonus corporation - Which of the following abbreviations means nothing by mouth - Static systems bedhead trunking - Englisch hilfen present simple - How to calculate litres of paint per square metre - 601 bus timetable adelaide - Auditors need to be attuned to the red flags that fraud may exist because - American units of measurement - How to write a concert report - Solve the equation calculator - What is the reading of the voltmeter now - Moodle ubss - Iom sputum test result - Operation of astable multivibrator - M11 x 1.5 tap drill size - Swinburne online semester dates - Sangare 12 pages due by 48 hours - Health Insurance Project - Like a house on fire litcharts - Nhtv breda university of applied sciences - Designing pay levels mix and pay structures - Early intervention assessment checklist - Mystic monk coffee case study solution pdf