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

This is a partial adjusted trial balance of ramon company - Case study memo format - Mitchell antar - Michael himes three key questions - Create a scenario summary report excel 2013 - EXPLAIN NOLA PENDER'S MODEL AND HOW CAN YOU APPLY IT TO YOUR NURSING PRACTICE. EXPLAIN IN 150 WORDS - I am sam cast - Jb hi fi exchange policy - Where is moscow math worksheet answer - Structuredquery log temp folder - What are the basic functions of money - Buff and tuff gym excel - 2 main branches of statistics - Sugar bowl case study analysis - Psychiatric mental health nurse practitioner review and resource manual pdf - Writing Assignment - Converging and diverging tectonic plates - St ronan's primary school newry - The fourteenth goldfish movie - Biology lab variation in cell structure - Mendelian genetics lab answer key - Plymouth city council staffroom - Change impact analysis template - Being an outsider essay - Coco3 soluble or insoluble - Kristen's cookie company gantt chart - How many pounds of raw material are needed to make one unit of alpha and one unit of beta? - Challenger guaranteed income plan pds - P&g and gillette merger ppt - Fractional hexadecimal to decimal - Energy systems response to acute exercise - 1945 jamie grace ukulele chords - Which of the following shows the correct indentation when listing a source in apa format? - Sarvodaya batticaloa contact number - Elements of drama graphic organizer - Datto does destiny outbreak prime - 978 1 4963 0023 2 - Interpreting intraclass correlation coefficient spss - Small Group Communication - Prisma print tilburg university - Adding subtracting integers word problems - Ratio analysis assignment doc - Disney parks and resorts strategy - Managing risk to avoid supply chain breakdown - Project Mgmt - Reflection, Discussion and Assignment - Writing - Bessel function of order 1 domain - Quest diagnostics drug test procedure - NURS561PROMPT2REPLY - You are a member of a production crew filming - How to write a house captain speech - DiscussionB 8 - Know it no dingbat - Things fall apart questions and answers chapter 1 13 - Your Leadership Profile - Key competitors for uhc medicare supplement - Week 5 Part 2 - Examples of social institutions - Koegel PowerPoint Presentation - Effective practices for managers and supervisors cja 474 - How to take fosamax once weekly - Hour fitness day free trial survey - A7 - Renaissance reformation and scientific revolution - Personal leadership - Public administration week 10 dis - I need a discussion - Effect of chemical germicides on bacterial growth - Integumentary case study - Art History - Lifespan - Lord of the flies excerpt - High speed rail paris to milan - Sas information delivery portal - How to measure diameter using micrometer - Conflict resolution network australia - BCOMM5.01 - Read clinic central coast - Cast udl lesson builder 2011 website - Benefits of hot water foot bath - Need it in 1 hour - Shadow health musculoskeletal interview guide - Executive Leadership Self-Assessment and Self-Development Plan - Dalton sherman speech - Texas politics ideal and reality 13th edition pdf - Indian merchant chamber courses - Ka and kb values table - Addison inc uses a perpetual inventory system - To the right honourable william earl of dartmouth poem - Of mice and men ageism - Terasaki motor operator t2mc40 manual - Dink method calculator - A project that provides annual cash flows of - Umuc math 107 final exam answers - Allianz oshc bulk billing - Organ leader and decision making - Looking for alibrandi characters - What is a relevant market in compensation - One purpose of closing entries is to - Answer all 24 questions in this part