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

Gen 499 general education capstone ashford university - Mahesh anand open university - Kellogg's executive summary - Kepnock state high school - Belbin team roles at work 1993 - IISP DISCUSSION-5-dummm - Sharepoint employee self service - Fingerprint basics science spot worksheet answers - You are mine spencer combs chords - Medical law ethics & bioethics for the health professions pdf - Korean literature in english - Real life situations using linear equations - Shark tank powerpoint template - Swami niranjan yoga nidra - Is computer software an intangible asset - Goldair 10l evaporative cooler - Bgsu.instructure - U of a ansys - Complications of myocardial infarction ati - Protecting digital evidence documentation and the chain of custody - Wawa no cidal movie - Benihana process flow diagram - Dermnet skin disease atlas - Leader in action formula isagenix - Calorimetry post lab answers - Death be not proud john donne paraphrase - Loving Animals to Death” – Analytical Activity - What makes the psychoanalytic-social perspective of personality unique? - Is copper more reactive than iron - Tread softly dan murphys - Caco3 + hcl ionic equation - Gene splicing virtual lab - Marketing james l burrow answers - K3 fe c2o4 3 3h2o - Dc shunt motor circuit diagram - Honest tea business model canvas - Haydn trumpet concerto 1st movement analysis - I believe statements list - Newton divided difference interpolation solved example - Intro to psychology test bank - Powerpoint due in 48 hours - The anthropocentric viewpoint implies that - Help 2 - Business Articles Every Entrepreneur Should Read - Definition of mississippian indians - Applying Current Literature to Clinical Practice - Kingswode hoe school staff - Double integral to polar coordinates converter - Nucor competitive advantage - Business and society stakeholders ethics public policy 15th pdf - Alliteration in annabel lee - Everybody from the 313 beat - Gluten free pain au chocolat tesco - Which of the following is not a tropic hormone - Bead and button magazine website - Security Assessment for healthcare industry - Williams institute ethics awareness inventory - Prepare a statement of cost of goods manufactured - Reflective journal-self appraisal 4 - Carter cleaning center - Health education - Leckie and leckie higher french - The relationship between insolation and air temperature through the course of day indicates that - Lord bernstein v skyviews and general ltd [1978] q.b. 479 - Hierarchy chart pseudocode - Max oxidation state of mn - Robert marks origins of the modern world summary - Beamex mc5 calibrator price - Bostik middleton ma explosion - 3306 tcp open mysql unauthorized exploit - Stornoway ullapool freight ferry timetable - Adam and eve albrecht durer engraving - Dorian majied - Mount everest 1996 case study - Sydney secondary college balmain - Commonwealth protective security manual - 57 strathtay bus timetable - Gcu practicum field experience observation and activity log - Yearly Reports - Create a Lesson Plan - Anchorage port stephens accommodation - Strategic group map restaurant industry - 16 strathallen avenue northbridge - Policy and politics why nurses should get involved - Calculate activation energy from slope - Psychotherapy question 2 - Half wave rectifier circuit lab report - Car allowance rebate system cars - Facebook inc the initial public offering case study - Smart parking space app - Which god helps gilgamesh and enkidu kill humbaba the terrible, guardian of the cedar forest? - Idexx chem 17 cost - Counseling Treatment Plan - Www ucmp berkeley education explorations tours fossil index html - Wgu community health task 1 - Assigm 5 IPT - Mt baw baw apartments - Stephen king my creature from the black lagoon analysis - Desert eagle hypnotic rare pattern - Economic integration can unintentionally reward a less efficient producer within a trading bloc.