BA01 Group10 Assignment 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

GROUP NO: - 10

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")

#importing the dataset


> mydata<-read.csv("CardioGoodFitness.csv", header = TRUE)
> attach(mydata)
> View(mydata)

#summary between the three products


> by(mydata, INDICES=Product, FUN=summary)
#Bar plots of each of the three categorical products
> barplot(table(Product),col=c("Blue","Green","Orange"), ylab = "Count", main
="Bar plots of each of the three categorical product purchased")

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.

#Box plot of Education Distribution by Product

> boxplot(Education~Product,horizontal = TRUE,col=c("Blue","Yellow","Green"),


main="Education-wise Ditribution of Product")

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)

#Plotting histogram for each product category w.r.t Education


> histogram(~Education | factor(Product), data = mydata)
#Plotting histogram for each product category w.r.t Marital Status
> histogram(~MaritalStatus | factor(Product), data = mydata)

#Plotting histogram for each product category w.r.t Annual Income


> histogram(~Income | factor(Product), data = mydata)
#Plotting histogram for each product category w.r.t Average Usage
> histogram(~Usage | factor(Product), data = mydata)

#Plotting histogram for each product category w.r.t Average Miles


> histogram(~Miles | factor(Product), data = mydata)
Conclusion:
TM195 represents an even split between males and females, and their ages range widely from
18 years old to 47 years old. Their median income is the lowest across the three treadmill
products at $46,647, and years of education ranges between 12 and 18. They have a median
fitness of 3, and there is a wide variation in the number of times they plan to use the treadmill
per week, ranging from 2 times to 5 times a week. On average, they plan to run the least each
time they use the treadmill. TM498 customer base represents a relatively even split between
males and females. Their age ranges between 19 and 45 years of age, and their median income
is slightly higher at $49,460. Years of education range similarly between 12 and 18 and the
median fitness is also 3. There is a lower variation in the number of times they intend to use the
treadmill per week, ranging only between 3 to 4 times a week. On average, they plan to run
slightly more each time they use the treadmill. TM798 has a distinct customer profile that
separates it clearly from that of TM195 and TM498. Its customer base is dominated by males,
with a female: male ratio of about 1:5. The median Fitness is 5 (the highest possible rating), the
median number of times they plan to use the treadmill per week is 5, and the median number of
miles they intend to log is 160 miles, which is almost twice the median of TM195 and TM498
buyers. These enthusiasts also earn more than TM195 and TM498 buyers. They have a median
income of $76,568.50 — almost 1.5 times that of the buyers of TM195 and TM49 - and they
receive more years of education, ranging between 14 to 21 years.

2. Linear Programming: It is a mathematical model or technique for efficient and effective


utilization of the limited resources available to achieve organization objectives i.e. to Maximize
Profits or Minimize Cost.
Characteristics of a Linear Programming Problem are:
→ The decision is represented in the model by “decision variables”
→ The problem encompasses a goal, expressed as an “objective function”, that the decision
maker wants to achieve
→ There are a number of “constraints” or restrictions- expressible in quantitative terms
→ The relationship between objective function and constraints are “linear”
→ The number of inputs and outputs need to be finite
Advantages:
1. LP makes logical thinking and provides better insight into business problems
2. LP provides an information base for optimum allocation of scarce resources
3. LP assists in making adjustments according to changing conditions

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

RAW MATERIAL 1 3 2 20(KG)


RAW MATERIAL 2 1 2 9(KG)

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

Units to Produce 4 2.5

Total Profit 119

Max Quantity
4
of Product 1

Solver Model Solution

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.

You might also like