This assignment is suppose to be an R studio sheet which is then knited into an R markdown file and word doc. The instructions are attached in greater detail. It is for a linear Regression & Analysis...

1 answer below »

View more »
Answered 4 days AfterApr 02, 2024

Answer To: This assignment is suppose to be an R studio sheet which is then knited into an R markdown file and...

Mukesh answered on Apr 07 2024
18 Votes
Credit Card Company. A Business Analytics Lab Report.
Credit Card Company. A Business Analytics Lab Report.
ABC
2024-04-06
About project
Suppose you work for a credit card company and were assigned an analytics project for which you decided to apply regression analysis methods. Your supervisor asked you to investigate d
ifferences in credit card balance between males and females, differences in average balance between different ethnicities Caucasians, Asians and African Americans (AA) and address differences in credit card balances between married and non-married. In addition, you were also asked to investigate the effect of Income, Age, and Education on credit card balances.The following observations for a number of potential customers were recorded and stored in a data file named “CreditCards”: balance (average credit card debt for a number of individuals), as well as quantitative predictors: age, education (years of education), marital Status (married or not), income (thousands of dollars), limit (credit limit). (Data file, “CreditCards.csv” is posted on Brightspace).
library(readxl)
library(tidyverse)
library(dplyr)
library(ggplot2)
library(GGally)
# Step 1: Load data and perform exploratory data analysis
credit <- read_excel("C:/Users/vishw/Downloads/creditcards-kbg2csvx.xlsx")
# Assuming 'credit' is your data frame, you can use mutate_at to convert multiple columns to factors
credit <- credit %>%
mutate_at(vars(Gender, Married, Ethnicity), as.factor)
# Structure of data
str(credit)
## tibble [400 × 8] (S3: tbl_df/tbl/data.frame)
## $ Income : num [1:400] 14.9 106 104.6 148.9 55.9 ...
## $ Limit : num [1:400] 3606 6645 7075 9504 4897 ...
## $ Age : num [1:400] 34 82 71 36 68 77 37 87 66 41 ...
## $ Education: num [1:400] 11 15 11 11 16 10 12 9 13 19 ...
## $ Gender : Factor w/ 2 levels "Female","Male": 2 1 2 1 2 2 1 2 1 1 ...
## $ Married : Factor w/ 2 levels "No","Yes": 2 2 1 1 2 1 1 1 1 2 ...
## $ Ethnicity: Factor w/ 3 levels "AA","Asian","Caucasian": 3 2 2 2 3 3 1 2 3 1 ...
## $ Balance : num [1:400] 333 903 580 964 331 ...
1. Do an exploratory analysis of your data (know your data, variable types, generate visuals).
# Summary of data set
summary(credit)
## Income Limit Age Education Gender
## Min. : 10.35 Min. : 855 Min. :23.00 Min. : 5.00 Female:207
## 1st Qu.: 21.01 1st Qu.: 3088 1st Qu.:41.75 1st Qu.:11.00 Male :193
## Median : 33.12 Median : 4622 Median :56.00 Median :14.00
## Mean : 45.22 Mean : 4736 Mean :55.67 Mean :13.45
## 3rd Qu.: 57.47 3rd Qu.: 5873 3rd Qu.:70.00 3rd Qu.:16.00
## Max. :186.63 Max. :13913 Max. :98.00 Max. :20.00
## Married Ethnicity Balance
## No :155 AA : 99 Min. : 0.00
## Yes:245 Asian :102 1st Qu.: 68.75
## Caucasian:199 Median : 459.50
## Mean : 520.01
## 3rd Qu.: 863.00
## Max. :1999.00
Create bar chart for Gender
ggplot(credit, aes(x = Gender)) +
geom_bar(fill =...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here
April
January
February
March
April
May
June
July
August
September
October
November
December
2025
2025
2026
2027
SunMonTueWedThuFriSat
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
00:00
00:30
01:00
01:30
02:00
02:30
03:00
03:30
04:00
04:30
05:00
05:30
06:00
06:30
07:00
07:30
08:00
08:30
09:00
09:30
10:00
10:30
11:00
11:30
12:00
12:30
13:00
13:30
14:00
14:30
15:00
15:30
16:00
16:30
17:00
17:30
18:00
18:30
19:00
19:30
20:00
20:30
21:00
21:30
22:00
22:30
23:00
23:30