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

Four Ps of Marketing Assignment - Module 2: Price Submit Assignment - Robin hood case answers - Concrete mix proportion table - Prepare a context diagram for new century's information system - Time lags in fiscal policy - Chinese Literature Readings and Answer Questions - Blaine company had these transactions pertaining to stock investments - Managerial Economics Discussion Needed in 8 hours - How many letters in the italian alphabet - Organelle observations cell lab 1 answers - Www edge asic gov au - Proscenium arch stage diagram - 3d printing process ppt - Explain how using edi facilitates electronic transactions in healthcare - Ge rr7 relay replacement - Qualitative analysis flow chart cations - Prepare a budgeted balance sheet as of may 31 - Artemis fowl discussion questions - Case study discussing domestic human resource structures - 65 channel road shepparton - Wageman and donnenfeld conflict intervention model - Project - Shear centre vs top flange - Social work research ppt - Companies use job cost sheets to track the costs of - Miss rose white dvd - 350 word answer - Skill related fitness components - Britannia rescue csma discount - Cirque du soleil boston university - Business Proposal Part 1 - Political Science Discussion 4 - Political Parties - All about me essay - An introduction to retailing chapter 1 - Fitbit harvard case study - Msc cardiorespiratory physiotherapy uk - Seven step decision model - Adrian underhill phonemic chart printable - 45 bunbury street footscray - 3 statement model - Cheapest owner builder course qld - Initiating the Project - Wiki wireshark sample captures - Twisted pair coaxial fiber optic - Ibm logo no background - Creating one of the following: PowerPoint, Word Document, Notebook paper or Sway. - I want to die while you love me - Axa accumulator elite - Matthew john nursing home erina - Isbn 10 1 305 38983 2 - How to connect to ipmi supermicro - Ch 112 applied chemistry past papers - Access grader project chapter 3 - Grammar check - Record of achievement template - Time constant of rc circuit experiment - Cjt102 discussion - Grand chase rufus 4th job - Best Love Vashikaran Specialist Molvi Ji+91-9829644411 - Finance - What is a pcbu - History of health informatics in the united states - Find a Resource Collaboration - The crucible study guide answers act 2 - Diamond court reporting 150 broadway - Essay - Spelling connections grade 4 unit 8 - Which is better controlled access or contention explain - Discussion 08.1: Analysis of Variance (ANOVA) - 6 day push pull legs program - Indirect high frequency aftercare - How might data analytics hurt policing - Capstone Project Change Proposal Presentation for Faculty Review and Feedback (Fall prevention strategies in hospitals.) - Performance lawn equipment case study solution - Multiple choice questions on recruitment and selection with answers - Disney annual dividend per share - Thinking through the past volume 2 5th edition - How to measure dna ladder - Boeing 737 take off procedures - Traveline scotland journey planner - Local store marketing guide - Winter is coming song lyrics - List and define the five components of physical fitness - 05.05 should free trade be a goal - Research week 8 erm - Pediatric drug use - Indirect object pronouns french - Nottingham trent university foundation - Vcaa study design biology - Which of the following accounts appear on the balance sheet - Determining the enthalpy of a chemical reaction lab report answers - Heliplane aircraft 18a gyroplane - Audio Visual Presentation: - Group Processes and Stages of Formation - !!~Italy~!! +91-8529590991 Love Marriage Specialist Molvi ji - Fleet service clerk duties - Essay - Interesting facts about genesis - Leg 500 assignment 2 employment at will doctrine - Group project