100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
BUSI 1302 INTRODUCTION TO BUSINESS (MGMT 105) HOMEWORK 5 TEXAS A& M UNIVERSITY $15.49   Add to cart

Exam (elaborations)

BUSI 1302 INTRODUCTION TO BUSINESS (MGMT 105) HOMEWORK 5 TEXAS A& M UNIVERSITY

 1 view  0 purchase
  • Course
  • BUSI 1302
  • Institution
  • BUSI 1302

BUSI 1302 INTRODUCTION TO BUSINESS (MGMT 105) HOMEWORK 5 TEXAS A& M UNIVERSITY

Preview 2 out of 9  pages

  • November 14, 2024
  • 9
  • 2024/2025
  • Exam (elaborations)
  • Unknown
  • BUSI 1302
  • BUSI 1302
avatar-seller
saraciousstuvia
BUSI 1302 INTRODUCTION TO
BUSINESS (MGMT 105)
HOMEWORK 5 TEXAS A& M
UNIVERSITY

, 1. Predicting runs from hits

a. Read in the baseball data set from Homework 4.

Ans. > baseball <- read.csv("baseball.csv")

> head(baseball)
Team Payroll League Wins Losses AVG Runs Hits HRs ER
1 Arizona Diamondbacks 74284833 National 81 81 0.259 734 1416 165 3.9
2 Atlanta Braves 83309942 National 94 68 0.247 700 1341 149 3.4
3 Baltimore Orioles 81428999 American 93 69 0.247 712 1375 214 3.9
4 Boston Red Sox 173186617 American 69 93 0.260 734 1459 165 4.7
5 Chicago Cubs 88197033 National 61 101 0.240 613 1297 137 4.5
6 Chicago White Sox 96919500 American 85 77 0.255 748 1409 211 4.0


b. Fit a linear regression model that predicts Runs based on the number of Hits.

Ans. > model_new<-lm(Runs~Hits, data = baseball)
> model_new

Call:
lm(formula = Runs ~ Hits, data = baseball)

Coefficients:
(Intercept) Hits
-78.5152 0.5557



c. Print out a summary of your model

Ans. > summary(model_new)

Call:
lm(formula = Runs ~ Hits, data = baseball)

Residuals:
Min 1Q Median 3Q Max
-74.520 -24.820 -8.406 31.661 70.150

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -78.51518 124.31713 -0.632 0.533
Hits 0.55565 0.08853 6.277 8.72e-07 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 38.08 on 28 degrees of freedom
Multiple R-squared: 0.5846, Adjusted R-squared: 0.5697
F-statistic: 39.4 on 1 and 28 DF, p-value: 8.72e-07



d. What is the R-squared for your model?

Ans. > sst<-sum((baseball$Runs-mean(baseball$Runs))^2)

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller saraciousstuvia. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $15.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

75632 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$15.49
  • (0)
  Add to cart