BA01 Group10 Assignment 2
BA01 Group10 Assignment 2
BA01 Group10 Assignment 2
GROUP MEMBERS
AADITYA MANDLOI (20194402)
DEBAJYOTI PADHI (20192210)
DIMPLE MOHANTA (20192213)
DIPANJAN MONDAL (20194417)
HEMANT KUMAR SINGH (20194421)
NEERAJ R KUMAR (20192326)
SAKSHI SHARDA (20192341)
SUBHAM PAUL (20192254)
VIDHI SINGHAL (20192361)
1. Cardio Good Fitness: Performing descriptive analytics to create a customer profile for each
Cardio Good Fitness Treadmill Product line.
#Setting up the working directory
> setwd("G:/R Working Directory")
Analysis: The Product bar plot suggests that TM195 is the most popular treadmill product with
the highest mode of 80 purchases, followed by TM498 with a frequency of 60 purchases. TM798
is the least popular product with a frequency of 40 purchases.
#Bar plots of the gender split across the three categorical products
> barplot(table(Gender,Product),col=c("Pink","Yellow"), legend=c("Female","Ma
le"),ylab = "Count", main = "Gender split across the three products")
Analysis: The gender split across TM195 and TM498 buyers is quite even, there is a considerable
preference for TM798 among males.
#Box plot of Age Distribution by Product
> boxplot(Age~Product,horizontal = TRUE,col=c("Red","Skyblue","LightGreen"),m
ain="Age-wise Ditribution of Product")
Analysis: It can be found that TM195 and TM498 appeal to a broad range of ages. The buyers
range between approximately 18–19 years old and 45–47 years old. However, TM798 buyers
appeal to a noticeably smaller age range — the buyers only range between 22 years old and 38
years old.
Analysis: TM798 buyers appear to be more highly educated than buyers of TM498 and TM195.
While TM195 and TM498 buyers receive between 12 to 18 years of education, TM498 buyers
receive between 14 to 21 years of education.
#Bar plot of Product Buyers by Marital Status
> barplot(table(MaritalStatus,Product),col=c("Skyblue","Yellow"),ylab="Count"
,main="Product Buyers by Marital Status",legend=c("Single","Partnered"))
Analysis: No significant difference in the marital status split between partnered and single is
observed between products.
#Box plot of Income Distribution by Product
> boxplot(Income~Product, horizontal=TRUE, col=c("Red", "Blue","Yellow"), mai
n ="Income-wise Distribution of Product")
Analysis: The buyers of TM195 and TM498 have incomes ranging from approximately $30,000 to
$68,000, the buyers of TM798 have incomes ranging from approximately $49,000 to $105,000.
The buyers of TM798 have a median income of $76,568.50, almost 1.5 times that of the buyers
of TM195 and TM49.
#Box plot of Usage Distribution by Product
> boxplot(Usage~Product, horizontal=TRUE, col=c("SkyBlue","Green","Orange"),
main ="Usage Distribution by Product")
Analysis: Buyers of TM798 plan to be heavier users of their treadmills than buyers of TM195 and
TM498. They expect to use their treadmills 3 to 6 times a week, with a median usage of 5 times
a week. On the other hand, buyers of TM195 and TM498 expect to use their treadmills between
2 to 5 times and 3 to 4 times, respectively, with median usages of 3 times a week.
#Box plot of Miles Distribution by Product
> boxplot(Miles~Product, horizontal=TRUE, col=c("SkyBlue","Green","Orange"),
main ="Miles Distribution by Product")
Analysis: Buyers of TM798 expect to log more miles on their treadmills than buyers of TM195
and TM498. They expect to log between 75 miles and 300 miles on their treadmills, with a median
of 160 miles. This is almost two times the median of the expected miles log by buyers of TM195
and TM498.
#rpivottable library used for visualization purpose and it also have drag n drop functionality
> library(rpivotTable)
> rpivotTable(mydata)
#enabling lattice package for histogram
> library(lattice)
Description: The lattice add-on package is an implementation of Trellis graphics for R. It is a
powerful and elegant high-level data visualization system with an emphasis on multivariate data.
It is designed to meet most typical graphics needs with minimal tuning, but can also be easily
extended to handle most nonstandard requirements.
#Plotting histogram for each product category w.r.t Gender
> histogram(~Gender | factor(Product), data = mydata)
#Plotting histogram for each product category w.r.t Age
> histogram(~Age | factor(Product), data = mydata)
Limitations:
1. This technique could not solve the problems in which variables cannot be stated
quantitatively
2. LP technique cannot solve the business problems of non-linear nature
3. This technique is highly mathematical and complicated
Profit Maximization using Solver Tool: One of the divisions of a small-scale unit manufacturer’s
has two products. Both the products require two raw materials and the consumption (KG) per
unit production is given below: -
MAX AVAILABILITY
PRODUCT 1 PRODUCT 2
PER DAY
The profit per unit of product 1 is $16, and product 2 is $22.The maximum quantity of product
1 that can be sold is 4 units. So here in this problem, we have used the solver tool to decide on
the number of units of product 1 and product 2 to be produced so as to maximize the total profit
(per day).
Solution:
1) Formulation of the Problem:
Identify the decision variables. Let X1= number of units of Product 1 to be produced/day,
X2= number of units of Product 2 to be produced/day.
2) Formulation of Objective Function:
In terms of the decision variables, formulation of objective function is done. The profit per
unit of the Product 1 is $16 and Product2 is $22. If X1 units of Product 1 & X2 units of Product
2 is produced, then Total Profit= 16X1+22X2.
This has to be maximized. In Linear Programming Problem, the objective function = Z=
16X1+22X2 and Z is to be maximized.
3) Formulate the Constraints:
The constraints are formulated in terms of the decision variables. The maximum quantity of
Product 1 that can be sold is 4 units.
So, X1<= 4 (Sales Constraints)
The maximum availability of raw material 1 is 20 kg. To produce X1 units of Product 1 & X2
units of Product 2, we need 3X1+2X2<= 20 (raw material availability).
Similarly, the maximum availability of raw material 2 is 9 kg we can work out the raw material
availability constraint for raw material 2, X1+2X2<=9 (raw material 2 availability).
Maximize Z= 16X1+22X2
Subject to: X1<= 4
3X1+2X2<= 20
X1+2X2<=9
Maximum
Product 1 Product 2
Availability Per Day
Raw Material 1 3 2 17
Raw Material 2 1 2 9
Profit 16 22
Max Quantity
4
of Product 1
Here, in the above table it is clearly visible that we need to produce 4 units of Product 1 and 2.5
units of Product 2 so as to get the maximized total profit. Also, the maximum availability per day
for raw material 1 has come down to 17 kg from 20 kg. So with minimum amount of raw
materials, the maximum total profit came out to be $119.