Qn(C).
Validating our best model by checking residuals state.
hist(residuals(model.best),
col="darkgray")
The residuals appear to be normal, therefore, it satisfies normality of data assumption.
Plotting our model yields;
plot(model.best)
The only outlier
(c)
abline(lm(y~x)
(d)
(yhat) is fitted values of y and (res) is residuals of r and the code in R are given by;
yhat=x%*'mat
res=y-yhat
The plotted graph below shows the mean residuals(res) doesn't change with the
fitted values(yhat) but the spread of the
Qn(D).
Predicting shotput distance which has a power clean of 80 yields 14.31354.
newdata = data.frame(powerc= 80,powerc3= 80^3)
predict(model.best, newdata, interval="predict")
#
fit
lwr
upr
# 1 14.31354 12.02972 16.59736
Qn1.
Computing mean and variances of passengers in June and October we get;
Mean of June = xbar= 6.206
Mean of October = ybar = 6.023
Variance of June = var(x)= 0.106
Variance of October =var(y) = 0.110
Stating hypothesis.
Ho: 1 = 2(i.e., 1 - 2= 0)
Ha: 1
(e)
Checking Normality of residuals using Shapiro Wilk test and q-q plot.
From the graph, the residual is more distributed to the left. (left skewed) the
Shapiro Wilk test result rejects the hypothesis that these data
#were independently drawn from a comm
Q2
(a)
Stating hypothesis
Ho: ^2 = o^2(equal variance)
Ho: ^2 != o^2(not equal variance)
Test statistic is given by; T = (N-1)(s/o)^2
Critical region is given by:
CR: T > 2/2, n-1
T = (11-1)(9.6506/8)^2
T= 12.06325
From the chi-square table -: (0.005,10)
Qn(3)
(a)
load("E:/brianokari/Documents/heathrow.RData")
#heathrow2 <-write.csv(dat, file = "heathrow.RData.csv")
attach(dat)
y<-dat[,4]
x<-dat[,3]
scatplot<-plot(x,y)
Scatterplot of movements(y) against passengers(x) is as below;
(b)
The mean of passenge
Qn(B).
Constructing sequential anova tables which is type I anova.
Anova between model.1 and model.2
anova(model.1, model.2)
#
#
#
#
#
#
#
#
#
Analysis of Variance Table
Model 1: shotp ~ powerc
Model 2: shotp ~ powerc + powerc2
Res.Df RSS Df Sum of Sq
F P
Qn(A).
Importing data from text file to R.
field_data =read.table("field.txt", header = TRUE)
#response variable (y)-shotp
#predictor variable(x)-powerc
Creating linear, quadratic, cubic and quartic variables.
library(dplyr)
field_data =
mutate(field_data
(g).
Using our model which states as below;
Y = 0 +1X(i)
Where; 0 and 1 are estimates of beta. We therefore predict the number of air movements when
passenger(x) are 6000000 by the following code:
b0=2.553994e+04
b1=2.340355e-03
prediction <- b0 + b1* 600
#call up and explore the data
data(anscombe)
attach(anscombe)
anscombe
cor(x1, y1) #correlation of x1 and y1
cor(x2, y1) #correlation of x2 and y2
par(mfrow=c(2,2) #create a 2x2 grid for plotting
plot(x1, y1, main="Plot 1")
plot(x2, y2, main="Plot 2")
plo
Create Sample Data
The following program prepares data that is used to demonstrate the method
of adding regression equation and rsquare to graph.
x = c(1:250)
mydata= data.frame(x, y= 30 + 2.5 * x + rnorm(250,sd = 25)
Load Required Library
library(gg
Insert surname 1
Name:
Course:
Date:
The importance of criminal intelligence in handling drug abuse crimes
Criminal intelligence is a term that is used in criminal justice and defined as the criminal
data compiled with a motive of anticipating, monitoring
Running head: VOLKSWAGEN CASE STUDY: REASSURING THE SHAREHOLDERS 1
Name:
Student Number:
Title: Volkswagen Case Study: Reassuring the Shareholders
Word count:
Date Submitted:
VOLKSWAGEN CASE STUDY: REASSURING THE SHAREHOLDERS
1
2
EXECUTIVE SUMMARY:
18th S
Running head: TREATMENT VERSUS PUNISHMENT IN JUVENILE JUSTICE SYSTEM
Topic: Treatment versus Punishment in Juvenile Justice System
Name: Garrick Nicols
Instructor:
Course:
Date:
1
TREATMENT VERSUS PUNISHMENT IN JUVENILE JUSTICE SYSTEM
2
Table of Contents
Acute care conditions & procedures for trauma surgery
Trauma surgery is a medical surgery specialization that implements the operative and
non-operative management to treat patients with traumatic conditions. The trauma conditions are
classified into two
Utilitarian Theory 1
UTILITARIAN THEORY
Name:
Institution Affiliation:
Date:
Utilitarian Theory 2
Introduction:
Utilitarianism began as a movement in ethics of the late eighteenth-century primarily
associated with an English philosopher Jeremy Bentham. Ut
Running head: SOCIAL MARKETING IN SCHOOLS
Thesis proposal: Social Marketing in schools: Development, implementation, and Evaluation
Name:
Institutional affiliation:
Date:
1
SOCIAL MARKETING IN SCHOOLS
2
The Problem and Methodologies:
The statement of the
Running head: TREATMENT VERSUS PUNISHMENT IN JUVENILE JUSTICE SYSTEM
Topic: Treatment versus Punishment in Juvenile Justice System
Name: Garrick Nicols
Instructor:
Course:
Date:
1
TREATMENT VERSUS PUNISHMENT IN JUVENILE JUSTICE SYSTEM
2
1 ABSTRACT:
The qu
The relationship between exchange rate movements and stock market Returns
The healthy relationship between stock prices and exchange rates have dynamically
attracted attention from different stakeholders including academic practitioners (Huchet &
Korinek,
Running head: BUILDING ZXY CORPORATION SECURE NETWORK
Building ZXY Corporation Secure Network
Name
Institutional Affiliation
1
BUILDING ZXY CORPORATION SECURE NETWORK
2
Building ZXY Secure Network
ZXY corporation new building is wired and set for LAN deve
Running head: A DEFENSE OF A SEMANTICALLY DIALETHEIST RESPONSE TO THE
LIARS PARADOX
Thesis Proposal: A Defense of a Semantically Dialetheist Response to the Liars Paradox
Name:
Institutional Affiliations:
Date:
l
1
A DEFENSE OF A SEMANTICALLY DIALETHEIST
Surname
Students Name:
Tutors Name:
Course:
Date Due:
Side by Side
LABORATORY DATA SHEET
EXPERIMENT: CALORIMETRY
Name _
Date_
Section_
Introduction
The purpose of these is to determine the Specific Heat. Also known as Heat Capacity, the
specific heat is t
SYSTEMATIC ANALYSIS OF A SCULPTURE
Boston womens memorial is located at the Commonwealth Avenue Mall in Boston inbetween the streets of Gloucester and Fairfield. It honors Philis Wheatley, Abigail Adams, and
Lucy Stone. Abigail Adams served as accomplice
Surname:
1
Students Name:
Tutors Name:
Course:
Date Due:
Genetic engineering is not the answer to hunger.
In the previous years, the world has seen numerous progressions and advances; however
none holds the same number of potential outcomes as a hereditar
Surname
1
Students Name:
Tutors Name:
Course:
Date Due:
Discourse Communities
Genre analysis is a way to deal with talk and content investigation in ESP. Its exploration
discoveries have set up regular expository examples in scholastic written work. A gen
Running head: GESTALT THEORY
1
Gestalt Theory
Students name:
Institutional affiliation:
GESTALT THEORY
2
Gestalt treatment is a sort of treatment used to extend our consciousness of ourselves and
our emotions in a less scholarly way than the more conventi
Surname:
1
Students Name:
Tutors Name:
Course:
Date Due:
Side by Side
Beside each other is a 2012 American account film facilitated by Christopher Kenneally.
It was made by Justin Szlasa and Keanu Reeves. It appeared at the 62nd Berlin International
Film