You are on page 1of 13

AMAT 110: Mathematical Modeling 10 January 2024

FINAL PAPER

ANALYSIS ON THE CONSUMER’S SPENDING HABIT BASED ON AGE-


RELATED REVENUE TRENDS USING A SEX-BASED DATA
AGGREGATION APPROACH
Renato A. Agcaoili Jr.
Imiesan Jace Balicot
Neil Christian E. Donato
Trizha Mae P. Necesito

I. INTRODUCTION
Consumer behavior is a multifaceted phenomenon influenced by various factors, among
which age and sex stand out as significant determinants. As the global marketplace evolves,
understanding the intricate relationship between age, sex, and consumer spending habits
becomes increasingly essential for businesses, policymakers, and researchers.

Research has delved deep into age-related consumer characteristics, revealing their
substantial influence on consumer attitudes and behaviors (Li et al., 2008). Slabá (2019)
particularly noted that purchasing behavior varies noticeably with age, with older consumers
(age 64 and above) being the most price-sensitive and exhibiting distinct preferences compared
to other age groups. This variation is not just confined to age; significant differences also emerge
in the shopping behaviors of male and female consumers. Lin et al. (2019) discovered that men
and women respond differently to marketing stimuli, with men showing more sensitivity to
website interactivity, while women are influenced more by the vividness and clarity of the
information, as well as perceived risks (Emami, 2017).

Additionally, a recent study by Shukla (2023) explored the relationship between aging and
consumer behavior, highlighting the changes in consumer preferences, attitudes, and decision-
making processes as people age. Shukla emphasized the importance of understanding how aging
influences consumer behavior to develop effective marketing strategies targeting aging
consumers. Furthermore, insights from Statista Consumer Insights (2023) delved into the
shopping attitudes of different generations in the U.S. regarding online shopping, revealing
distinct shopping styles and preferences across generations, particularly in terms of special offers
and fashion product choices. This study underscored the relevance of generational differences in
consumer behavior, particularly concerning age-related trends and sex-based consumption
patterns.

Our study is driven by the need to deepen our understanding of consumer spending habits
in a constantly evolving marketplace. We aim to provide a holistic perspective on consumer
behavior by exploring age-related revenue trends using a sex-based data aggregation approach.
The data for this study, which is simulated, was sourced from Kaggle, a popular online platform
renowned among data science and machine learning enthusiasts, boasting a perfect usability
score of 10.0. This dataset, representative of the U.S. consumer base, contains 34,865 entries,
providing a robust foundation for exploring various aspects crucial for achieving superior sales
performance (Bahl, 2022). In this study, the researchers have specifically focused on the
simulated variables of sex, age, and revenue in the U.S. context.

1
AMAT 110: Mathematical Modeling 10 January 2024
FINAL PAPER

II. RESULTS AND DISCUSSION


A. Data Gathering

For data gathering, the variable age was categorized into distinct brackets or bins with
assigned numeric values to each bracket and 5 as the width of each bracket. To ensure an equitable
distribution, the researchers equalized the number of entries across each age year through
counting the entries of each bracket per sex first.

Table 1. Age brackets and their corresponding number of entries per sex.
Age Bracket Male Female Total
17-21 1236 1463 2699
22-26 2084 2309 4393
27-31 2943 3113 6056
32-36 2856 2952 5808
37-41 2590 2544 5134
42-46 2059 2164 4223
47-51 1411 1420 2831
52-56 1064 1032 2096
57-61 507 487 994
62-66 214 223 437
67-71 47 61 108
72-76 14 14 28
77-81 22 11 33
82-87 14 12 26
Notice that the age group with the smallest number of participants is the 82-87 bracket for
females, consisting of 12 entries. Consequently, every sex-specific category will contain only 12
entries, resulting in a total of 24 entries for each age group. The selection of the 12 entries per sex
within each age bracket will be randomized using the Ablebits extension in Microsoft Excel.
Having the final collection of data below:
Table 2. Revenue (in USD) of male consumers per age bracket.
Interval Age
No. Bracket
Revenue (in USD) of Male Consumers
1 17-21 48 118 1111 948 177 22 1354 723 508 94 234 953
2 22-26 216 2030 428 1808 1169 638 823 406 33 58 534 85
3 27-31 520 665 8 82 1381 13 234 21 2213 1074 18 1889
4 32-36 7 562 26 567 717 784 1412 453 793 370 137 226
5 37-41 433 220 668 525 90 1108 1154 736 245 1107 2030 651
6 42-46 973 77 14 128 358 602 1079 11 206 370 202 251
7 47-51 572 615 21 232 120 42 785 1398 3219 164 1289 144
8 52-56 720 1562 90 44 542 1768 1028 1275 594 2038 1041 345
9 57-61 68 127 564 1491 1621 2108 91 466 96 415 1128 190
10 62-66 62 874 2175 1004 84 922 349 13 29 131 13 987
11 67-71 40 164 146 6 98 615 52 759 1037 734 936 148
12 72-76 729 1611 1146 214 141 150 150 1792 131 187 170 1358
13 77-81 127 59 144 70 778 150 19 84 32 306 361 212
14 82-87 949 3103 1092 92 332 52 6 383 54 92 123 3

2
AMAT 110: Mathematical Modeling 10 January 2024
FINAL PAPER

Table 3. Revenue (in USD) of female consumers per age bracket.


Interval Age
No. Bracket
Revenue (in USD) of Female Consumers
1 17-21 233 1038 2379 17 78 9 90 68 621 2138 186 285
2 22-26 155 221 1138 101 45 120 692 1239 2241 124 866 307
3 27-31 629 36 207 204 120 139 1254 64 238 1440 87 185
4 32-36 37 213 1768 674 67 267 600 438 522 1075 513 412
5 37-41 714 87 100 1989 92 875 194 155 34 458 684 770
6 42-46 732 1375 483 208 2336 128 26 2385 2199 201 164 93
7 47-51 785 761 1312 1037 1038 248 114 15 144 1197 90 864
8 52-56 355 395 70 63 23 2134 599 793 2063 1231 2305 774
9 57-61 257 66 2509 257 675 98 1133 389 201 1035 484 432
10 62-66 172 318 61 621 232 1152 106 1387 99 48 636 28
11 67-71 31 1154 764 130 108 24 504 87 20 691 419 283
12 72-76 471 385 25 766 45 1034 54 786 69 710 2238 684
13 77-81 337 803 188 754 32 691 200 128 93 959 148 263
14 82-87 101 22 383 171 53 1029 87 244 70 64 284 690

The researchers get the average revenue (in USD) per interval resulting to the final data below.
Table 4. Average revenue (in USD) of consumers per age bracket.
Average Revenue Average Revenue
Interval Age Average Revenue
(in USD) for male (in USD) for
No. Bracket (in USD)
consumers female consumers
1 17-21 524.1667 595.1667 559.6667
2 22-26 685.6667 604.0833 644.875
3 27-31 676.5 383.5833 530.0417
4 32-36 504.5 548.8333 526.6667
5 37-41 747.25 512.6667 629.9583
6 42-46 355.9167 860.8333 608.375
7 47-51 716.75 633.75 675.25
8 52-56 920.5833 900.4167 910.5
9 57-61 697.0833 628 662.5417
10 62-66 553.5833 405 479.2917
11 67-71 394.5833 351.25 372.9167
12 72-76 648.25 605.5833 626.9167
13 77-81 195.1667 383 289.0833
14 82-87 523.4167 266.5 394.9583

B. Age – Related Revenue Trends

This section will be divided into two subsections which is age-related revenue trends
without sex-based aggregation and with sex-based aggregation.

a. Age-related revenue trends without sex-based aggregation

To visualize more the relationship between age and revenue, we use the data “Average
Revenue (in USD)” in Table 4.

3
AMAT 110: Mathematical Modeling 10 January 2024
FINAL PAPER

1000
Average Revenue (in USD)
900
800
700
600
500
400 y = -14.538x + 674.11
300 R² = 0.1554
200
100
0
0 2 4 6 8 10 12 14 16
Interval No.

Figure 1. Graph of the average revenue (in USD) of consumers per interval.
Visually, it becomes apparent that the association between age and revenue is not
straightforward; hence, it lacks linearity. The trendline, for the most part, does not align closely
with the distribution of data points. Furthermore, the obtained linear regression model exhibits a
relatively low R-squared value of 0.1554, suggesting that only 15.54% of the observed variability
in the dependent variable (i.e., revenue) is accounted for by the regression model. Consequently,
it can be concluded that the trends in revenue pertaining to age are not linear (non-linear).

Now, the researchers considered another approach which could cater the non-linearity
behavior of the data given through natural cubic splines.

In creating cubic splines, the values of the parameters must satisfy the three conditions of
the cubic splines. Thus, leading to the system of equations below:

• For condition 1:
𝑎1 + 𝑏1 + 𝑐1 + 𝑑1 = 559.666666666667 (8)3 𝑎8 + (8)2 𝑏8 + 8𝑐8 + 𝑑8 = 910.5
(2)3 𝑎1 + (2)2 𝑏1 + 2𝑐1 + 𝑑1 = 644.875 (9) 𝑎8 + (9)2 𝑏8 + 9𝑐8 + 𝑑8 = 662.541666666667
3

(2)3 𝑎2 + (2)2 𝑏2 + 2𝑐2 + 𝑑2 = 644.875 (9)3 𝑎9 + (9)2 𝑏9 + 9𝑐9 + 𝑑9 = 662.541666666667


(3)3 𝑎2 + (3)2 𝑏2 + 3𝑐2 + 𝑑2 = 530.041666666667 (10)3 𝑎9 + (10)2 𝑏9 + 10𝑐9 + 𝑑9 = 479.291666666667

(3)3 𝑎3 + (3)2 𝑏3 + 3𝑐3 + 𝑑3 = 530.041666666667 (10)3 𝑎10 + (10)2 𝑏10 + 10𝑐10 + 𝑑10 = 479.291666666667
(4)3 𝑎3 + (4)2 𝑏3 + 4𝑐3 + 𝑑3 = 526.666666666667 (11)3 𝑎10 + (11)2 𝑏10 + 11𝑐10 + 𝑑10 = 372.916666666667

(4)3 𝑎4 + (4)2 𝑏4 + 4𝑐4 + 𝑑4 = 526.666666666667 (11)3 𝑎11 + (11)2 𝑏11 + 11𝑐11 + 𝑑11 = 372.916666666667
(5)3 𝑎4 + (5)2 𝑏4 + 5𝑐4 + 𝑑4 = 629.958333333333 (12)3 𝑎11 + (12)2 𝑏11 + 12𝑐11 + 𝑑11 = 626.916666666667

(5)3 𝑎5 + (5)2 𝑏5 + 5𝑐5 + 𝑑5 = 629.958333333333 (12)3 𝑎12 + (12)2 𝑏12 + 12𝑐12 + 𝑑12 = 626.916666666667
(6)3 𝑎5 + (6)2 𝑏5 + 6𝑐5 + 𝑑5 = 608.375 (13)3 𝑎12 + (13)2 𝑏12 + 13𝑐12 + 𝑑12 = 289.083333333333

(6)3 𝑎6 + (6)2 𝑏6 + 6𝑐6 + 𝑑6 = 608.375 (13)3 𝑎13 + (13)2 𝑏13 + 13𝑐13 + 𝑑13 = 289.083333333333
(7)3 𝑎6 + (7)2 𝑏6 + 7𝑐6 + 𝑑6 = 675.25 (14)3 𝑎14 + (14)2 𝑏14 + 14𝑐14 + 𝑑14 = 394.95833333333

(7)3 𝑎7 + (7)2 𝑏7 + 7𝑐7 + 𝑑7 = 675.25


(8)3 𝑎7 + (8)2 𝑏7 + 8𝑐7 + 𝑑7 = 910.5

4
AMAT 110: Mathematical Modeling 10 January 2024
FINAL PAPER

• For condition 2
3(2)2 𝑎1 + 2(2)𝑏1 + 3𝑐1 3(12)2 𝑎11 + 2(12)𝑏11 + 3𝑐11
= 3(2)2 𝑎2 + 2(2)𝑏2 + 3𝑐2 = 3(12)2 𝑎12 + 2(12)𝑏12 + 3𝑐12

3(3)2 𝑎2 + 2(3)𝑏2 + 3𝑐2 3(13)2 𝑎12 + 2(13)𝑏12 + 3𝑐12


= 3(3)2 𝑎3 + 2(3)𝑏3 + 3𝑐3 = 3(13)2 𝑎13 + 2(13)𝑏13 + 3𝑐13

3(4)2 𝑎3 + 2(4)𝑏3 + 3𝑐3 6(2)𝑎1 + 2𝑏1 = 6(2)𝑎2 + 2𝑏2


= 3(4)2 𝑎4 + 2(4)𝑏4 + 3𝑐4
6(3)𝑎2 + 2𝑏2 = 6(3)𝑎3 + 2𝑏3
2
3(5) 𝑎4 + 2(5)𝑏4 + 3𝑐4
6(4)𝑎3 + 2𝑏3 = 6(4)𝑎4 + 2𝑏4
= 3(5)2 𝑎5 + 2(5)𝑏5 + 3𝑐5
6(5)𝑎4 + 2𝑏4 = 6(5)𝑎5 + 2𝑏5
3(6)2 𝑎5 + 2(6)𝑏5 + 3𝑐5
= 3(6)2 𝑎5 + 2(6)𝑏5 + 3𝑐6 6(6)𝑎5 + 2𝑏5 = 6(6)𝑎5 + 2𝑏5
2
3(7) 𝑎6 + 2(7)𝑏6 + 3𝑐6 6(7)𝑎6 + 2𝑏6 = 6(7)𝑎7 + 2𝑏7
= 3(7)2 𝑎7 + 2(7)𝑏7 + 3𝑐7
6(8)𝑎7 + 2𝑏7 = 6(8)𝑎8 + 2𝑏8
3(8)2 𝑎7 + 2(8)𝑏7 + 3𝑐7
= 3(8)2 𝑎8 + 2(8)𝑏8 + 3𝑐8 6(9)𝑎8 + 2𝑏8 = 6(9)𝑎9 + 𝑏9

3(9)2 𝑎8 + 2(9)𝑏8 + 3𝑐8 6(10)𝑎9 + 2𝑏9 = 6(10)𝑎10 + 2𝑏10


= 3(9)2 𝑎9 + 2(9)𝑏9 + 3𝑐9 6(11)𝑎10 + 2𝑏10 = 6(11)𝑎11 + 2𝑏11
3(10)2 𝑎9 + 2(10)𝑏9 + 3𝑐9 6(12)𝑎11 + 2𝑏11 = 6(12)𝑎12 + 2𝑏12
= 3(10)2 𝑎10 + 2(10)𝑏10 + 3𝑐10
6(13)𝑎12 + 2𝑏12 = 6(13)𝑎13 + 2𝑏13
3(11)2 𝑎10 + 2(11)𝑏10 + 3𝑐10
= 3(11)2 𝑎11 + 2(11)𝑏11 + 3𝑐11

• For condition 3:
6(1)𝑎1 + 2𝑏1 = 0

6(14)𝑎13 + 2𝑏13 = 0

Now, using MATLAB, the cubic spline model follows:


Table 5. A cubic spline model for age-related revenue.
Interval Spline Model
1≤𝑥<2 𝑆1 (𝑥) = 62.04𝑥 − 286.15𝑥 2 + 309.31𝑥 1 + 559.67
3

2≤𝑥<3 𝑆2 (𝑥) = 62.04𝑥 3 − 100.02𝑥 2 − 76.85𝑥1 + 644.88


3≤𝑥<4 𝑆3 (𝑥) = 1.29𝑥 3 + 86.10𝑥 2 − 90.77𝑥 1 + 530.04
4≤𝑥<5 𝑆4 (𝑥) = −72.00𝑥 3 + 89.98𝑥 2 + 85.31𝑥1 + 526.67
5≤𝑥<6 𝑆5 (𝑥) = 55.16𝑥 3 − 126.01𝑥 2 + 49.27𝑥1 + 629.96
6≤𝑥<7 𝑆6 (𝑥) = 64.71𝑥 3 + 39.45𝑥 2 − 37.29𝑥 1 + 608.38
7≤𝑥<8 𝑆7 (𝑥) = −234.06𝑥 3 + 233.57𝑥 2 + 235.74𝑥1 + 675.25
8≤𝑥<9 𝑆8 (𝑥) = 219.96𝑥 3 − 468.62𝑥 2 + 0.70𝑥1 + 910.50
9 ≤ 𝑥 < 10 𝑆9 (𝑥) = −97.87𝑥 3 + 191.27𝑥 2 − 276.65𝑥 1 + 662.54
10 ≤ 𝑥 < 11 𝑆10 (𝑥) = 183.70𝑥 3 − 102.35𝑥 2 − 187.73𝑥1 + 479.29
11 ≤ 𝑥 < 12 𝑆11 (𝑥) = −353.43 𝑥 3 + 448.75𝑥 2 + 158.68𝑥 1 + 372.92
12 ≤ 𝑥 < 13 𝑆12 (𝑥) = 277.79 𝑥 3 − 611.53𝑥 2 − 4.10𝑥 1 + 626.92
13 ≤ 𝑥 < 14 𝑆13 (𝑥) = 277.79 𝑥 3 + 221.85𝑥 2 − 393.77𝑥1 + 289.08

In graph, the cubic spline model follows:

5
AMAT 110: Mathematical Modeling 10 January 2024
FINAL PAPER

Figure 2. Graph of the natural cubic spline and average revenue (data points) per interval.
Observe that the natural cubic spline adeptly encapsulated the non-linear dependencies
present in the data and demonstrated efficacy in precise interpolation between data points.
Consequently, it emerges as a superior model compared to the linear regression model mentioned
earlier.
Note the ascending revenue pattern within the range denoted as interval no. 8,
corresponding to the age bracket of 52-56, having the highest average revenue among all the age
brackets. Additionally, observed from Figure 2 that an apparent decline in revenue is evident
across the age brackets 57-61, 62-66, and 67-71. In addition, at age brackets 77-81, the average
revenue reaches its lowest.

b. Age-related revenue trends with sex-based aggregation

In analyzing the age-related revenue trends with sex-based aggregation (male and female),
we will be having two parts in this subsection and use the similar approach from above.

i) Age-related revenue trends for Male consumers


First, we need to visualize the relationship between the age and revenue (in USD) of male
consumers. Using the data from Table 4, we have:

1000
Average Revenue (in

800

600
USD)

400 y = -13.56x + 683.37


R² = 0.0936
200

0
0 2 4 6 8 10 12 14 16
Interval No.

Figure 3. Graph of the average revenue (in USD) of male consumers per interval.

6
AMAT 110: Mathematical Modeling 10 January 2024
FINAL PAPER

Observed from Figure 3 that the association between the age and average revenue (in USD)
of male consumers is not linear. Similar from Figure 1, the trendline does not align closely with
the distribution of data points. In addition, the generated linear regression model has a relatively
low R-squared value of 0.0936. This implies that only 9.36% of the observed variability in the
dependent variable (i.e., revenue) is accounted for by the regression model. Thus, it can be
concluded that the trends in the average revenue of male consumers pertaining to age are not
linear (non-linear).

Now, using similar approach that was applied in analyzing the age-revenue trends without
sex-aggregation we can effectively address the non-linear characteristics in the data observed in
males through natural cubic splines.

In creating cubic splines, the values of the parameters must satisfy the three conditions of
the cubic splines. Thus, leading to the system of equations below:

• For condition 1:
𝑎1 + 𝑏1 + 𝑐1 + 𝑑1 = 524.1666667 (8)3 𝑎8 + (8)2 𝑏8 + 8𝑐8 + 𝑑8 = 910.5
(2) 𝑎1 + (2)2 𝑏1 + 2𝑐1 + 𝑑1 = 685.6666667
3
(9)3𝑎8 + (9)2 𝑏8 + 9𝑐8 + 𝑑8 = 697.0833333

(2)3 𝑎2 + (2)2 𝑏2 + 2𝑐2 + 𝑑2 = 685.6666667 (9)3 𝑎9 + (9)2 𝑏9 + 9𝑐9 + 𝑑9 = 697.0833333


(3)3 𝑎2 + (3)2 𝑏2 + 3𝑐2 + 𝑑2 = 676.5 (10)3 𝑎9 + (10)2 𝑏9 + 10𝑐9 + 𝑑9 = 553.5833333

(3)3 𝑎3 + (3)2 𝑏3 + 3𝑐3 + 𝑑3 = 676.5 (10)3 𝑎10 + (10)2 𝑏10 + 10𝑐10 + 𝑑10 = 553.5833333
(4)3 𝑎3 + (4)2 𝑏3 + 4𝑐3 + 𝑑3 = 504.5 (11)3 𝑎10 + (11)2 𝑏10 + 11𝑐10 + 𝑑10 = 394.5833333

(4)3 𝑎4 + (4)2 𝑏4 + 4𝑐4 + 𝑑4 = 504.5 (11)3 𝑎11 + (11)2 𝑏11 + 11𝑐11 + 𝑑11 = 394.5833333
(5)3𝑎4 + (5)2 𝑏4 + 5𝑐4 + 𝑑4 = 355.9166667 (12)3 𝑎11 + (12)2 𝑏11 + 12𝑐11 + 𝑑11 = 648.25

(5)3 𝑎5 + (5)2 𝑏5 + 5𝑐5 + 𝑑5 = 355.9166667 (12)3 𝑎12 + (12)2 𝑏12 + 12𝑐12 + 𝑑12 = 648.25
(6)3 𝑎5 + (6)2 𝑏5 + 6𝑐5 + 𝑑5 = 716.75 (13)3 𝑎12 + (13)2 𝑏12 + 13𝑐12 + 𝑑12 = 195.1666667

(6)3 𝑎6 + (6)2 𝑏6 + 6𝑐6 + 𝑑6 = 716.75 (13)3 𝑎13 + (13)2 𝑏13 + 13𝑐13 + 𝑑13 = 195.1666667
(7)3 𝑎6 + (7)2 𝑏6 + 7𝑐6 + 𝑑6 = 920.5833333 (14)3 𝑎14 + (14)2 𝑏14 + 14𝑐14 + 𝑑14 = 523.4166667

(7)3 𝑎7 + (7)2 𝑏7 + 7𝑐7 + 𝑑7 = 920.5833333


(8)3 𝑎7 + (8)2 𝑏7 + 8𝑐7 + 𝑑7 = 910.5

• For conditions 2 and 3, the equations are the same with those in part (a) Age-related
revenue trends without sex-based aggregation.
Now, using MATLAB, the cubic spline model follows:
Table 6. A cubic spline model for age-related revenue of male consumers.
Interval Spline Model
1≤𝑥<2 𝑆1 (𝑥) = −53.46𝑥 + 75.06𝑥 2 + 139.90𝑥 + 524.17
3

2≤𝑥<3 𝑆2 (𝑥) = −53.46𝑥 3 − 85.33𝑥 2 + 129.63𝑥 + 685.67


3≤𝑥<4 𝑆3 (𝑥) = 275.15𝑥 3 − 245.73𝑥 2 − 201.43𝑥 + 676.50
4≤𝑥<5 𝑆4 (𝑥) = −469.57𝑥 3 + 579.74𝑥 2 + 132.58𝑥 + 504.50
5≤𝑥<6 𝑆5 (𝑥) = 554.30𝑥 3 − 828.98𝑥 2 − 116.65𝑥 + 747.25
6≤𝑥<7 𝑆6 (𝑥) = −361.37𝑥 3 + 833.92𝑥 2 − 111.71𝑥 + 355.92
7≤𝑥<8 𝑆7 (𝑥) = −17.99𝑥 3 − 250.19𝑥 2 + 472.01𝑥 + 716.75
8≤𝑥<9 𝑆8 (𝑥) = 163.01𝑥 3 − 304.17𝑥 2 − 82.34𝑥 + 920.58

7
AMAT 110: Mathematical Modeling 10 January 2024
FINAL PAPER

9 ≤ 𝑥 < 10 𝑆9 (𝑥) = −126.70𝑥 3 + 184.85𝑥 2 − 201.66𝑥 + 697.08


10 ≤ 𝑥 < 11 𝑆10 (𝑥) = 248.28𝑥 3 − 195.24𝑥 2 − 212.04𝑥 + 553.58
11 ≤ 𝑥 < 12 𝑆11 (𝑥) = −438.24𝑥 3 + 549.59𝑥 2 + 142.32𝑥 + 394.58
12 ≤ 𝑥 < 13 𝑆12 (𝑥) = 385.26𝑥 3 − 765.13𝑥 2 − 73.22𝑥 + 648.25
13 ≤ 𝑥 < 14 𝑆13 (𝑥) = 385.26𝑥 3 + 390.67𝑥 2 − 447.68𝑥 + 195.17

In graph, the cubic spline model follows:

Figure 4. Graph of the natural cubic spline and average revenue (data points) per interval for
male consumers.
Compared to Figure 3, the natural cubic spline in Figure 4 has captured the efficacy in
precise interpolation between the data points for male costumer revenue across age brackets.
Now, it can be observed that at age bracket 17-21 the average revenue is moderate which
increases until the second interval. Notably, observed that from a low revenue in interval 6,
representing age bracket 42-46, the trend on the revenue of male consumers increases on the
succeeding interval reaching its highest revenue at 920.58333 in interval 8, representing age
bracket 52-56. From this peak, an apparent decline in revenue is evident across the age brackets
57-61, 62-66, and 67-61, specifically at age bracket 77-81 who has the lowest average revenue.

ii) Age-related revenue trends for Female consumers


To visualize more the relationship between age and revenue of female consumers, the
graph of Table 6 follows:

1000
Average Revenue (in

800

600 y = -15.516x + 664.85


USD)

R² = 0.1249
400

200

0
0 2 4 6 8 10 12 14 16
Interval No.

Figure 5. Graph of the average revenue (in USD) of female consumers per interval.

8
AMAT 110: Mathematical Modeling 10 January 2024
FINAL PAPER

It is clear in Figure 5 that the relationship between age and revenue for female consumers
is not linear. The trendline generally doesn't match well with the scatter of data points.
Additionally, the linear regression model generated has a low R-squared value of 0.1249,
indicating that it explains only 12.49% of the variance in the dependent variable (revenue of
female consumers). Therefore, the revenue trends related to age of female consumers are non-
linear.

Similar to the approach applied in analyzing age-related revenue trends without


aggregating by sex, employing natural cubic splines was used to address the non-linear
characteristics observed in the data specific to females.

In creating cubic splines, the values of the parameters must satisfy the three conditions of
the cubic splines. Thus, leading to the system of equations below:

• For condition 1:
𝑎1 + 𝑏1 + 𝑐1 + 𝑑1 = 595.1666667 (8)3 𝑎8 + (8)2 𝑏8 + 8𝑐8 + 𝑑8 = 900.4166667
(2) 𝑎1 + (2)2 𝑏1 + 2𝑐1 + 𝑑1 = 604.0833333
3
(9)3 𝑎8 + (9)2 𝑏8 + 9𝑐8 + 𝑑8 = 628

(2)3 𝑎2 + (2)2 𝑏2 + 2𝑐2 + 𝑑2 = 604.0833333 (9)3 𝑎9 + (9)2 𝑏9 + 9𝑐9 + 𝑑9 = 628


(3)3 𝑎2 + (3)2 𝑏2 + 3𝑐2 + 𝑑2 = 383.5833333 (10)3 𝑎9 + (10)2 𝑏9 + 10𝑐9 + 𝑑9 = 405

(3)3 𝑎3 + (3)2 𝑏3 + 3𝑐3 + 𝑑3 = 383.5833333 (10)3 𝑎10 + (10)2 𝑏10 + 10𝑐10 + 𝑑10 = 405
(4)3 𝑎3 + (4)2 𝑏3 + 4𝑐3 + 𝑑3 = 548.8333333 (11)3 𝑎10 + (11)2 𝑏10 + 11𝑐10 + 𝑑10 = 351.25

(4)3 𝑎4 + (4)2 𝑏4 + 4𝑐4 + 𝑑4 = 548.8333333 (11)3 𝑎11 + (11)2 𝑏11 + 11𝑐11 + 𝑑11 = 351.25
(5)3 𝑎4 + (5)2 𝑏4 + 5𝑐4 + 𝑑4 = 512.6666667 (12)3 𝑎11 + (12)2 𝑏11 + 12𝑐11 + 𝑑11 = 605.5833333

(5)3 𝑎5 + (5)2 𝑏5 + 5𝑐5 + 𝑑5 = 512.6666667 (12)3 𝑎12 + (12)2 𝑏12 + 12𝑐12 + 𝑑12 = 605.5833333
(6)3 𝑎5 + (6)2 𝑏5 + 6𝑐5 + 𝑑5 = 860.8333333 (13)3 𝑎12 + (13)2 𝑏12 + 13𝑐12 + 𝑑12 = 383

(6)3 𝑎6 + (6)2 𝑏6 + 6𝑐6 + 𝑑6 = 860.8333333 (13)3 𝑎13 + (13)2 𝑏13 + 13𝑐13 + 𝑑13 = 383
(7)3 𝑎6 + (7)2 𝑏6 + 7𝑐6 + 𝑑6 = 633.75 (14)3 𝑎14 + (14)2 𝑏14 + 14𝑐14 + 𝑑14 = 266.5

(7)3 𝑎7 + (7)2 𝑏7 + 7𝑐7 + 𝑑7 = 633.75


(8)3 𝑎7 + (8)2 𝑏7 + 8𝑐7 + 𝑑7 = 900.4166667

• For conditions 2 and 3, the equations are the same with those in part (a) Age-related
revenue trends without sex-based aggregation.
Using MATLAB, the cubic spline model follows:
Table 8. A cubic spline model for age-related revenue of female consumers.
Interval Spline Model
1≤𝑥<2 𝑆1 (𝑥) = 177.55𝑥 3 − 647.35𝑥 2 + 478.72𝑥 + 595.17
2≤𝑥<3 𝑆2 (𝑥) = 177.55𝑥 3 − 114.71𝑥 2 − 283.34𝑥 + 604.08
3≤𝑥<4 𝑆3 (𝑥) = −272.57𝑥 3 + 417.94𝑥 2 + 19.89𝑥 + 383.58
4≤𝑥<5 𝑆4 (𝑥) = 325.58𝑥 3 − 399.78𝑥 2 + 38.04𝑥 + 548.83
5≤𝑥<6 𝑆5 (𝑥) = −443.98𝑥 3 + 576.95𝑥 2 + 215.20𝑥 + 512.67
6≤𝑥<7 𝑆6 (𝑥) = 490.78𝑥 3 − 755.01𝑥 2 + 37.14𝑥 + 860.83
7≤𝑥<8 𝑆7 (𝑥) = −450.13𝑥 3 + 717.33𝑥 2 − 0.53𝑥 + 633.75

9
AMAT 110: Mathematical Modeling 10 January 2024
FINAL PAPER

8≤𝑥<9 𝑆8 (𝑥) = 276.92𝑥 3 − 633.07𝑥 2 + 83.73𝑥 + 900.42


9 ≤ 𝑥 < 10 𝑆9 (𝑥) = −69.05𝑥 3 + 197.70𝑥 2 − 351.64𝑥 + 628.00
10 ≤ 𝑥 < 11 𝑆10 (𝑥) = 119.12𝑥 3 − 9.46𝑥 2 − 163.41𝑥 + 405.00
11 ≤ 𝑥 < 12 𝑆11 (𝑥) = −268.61𝑥 3 + 347.91𝑥 2 + 175.04𝑥 + 351.25
12 ≤ 𝑥 < 13 𝑆12 (𝑥) = 170.32𝑥 3 − 457.93𝑥 2 + 65.02𝑥 + 605.58
13 ≤ 𝑥 < 14 𝑆13 (𝑥) = 170.32𝑥 3 + 53.04𝑥 2 − 339.86𝑥 + 383.00

In graph, the cubic spline model follows:

Figure 6. Graph of the natural cubic spline and average revenue (data points) per interval for
female consumers.

From the graph illustrating cubic spline interpolation for female consumers revenue
across age brackets, Figure 6 shows a moderate starting average revenue in the youngest age
bracket, which slightly increases in the next interval. There is a noticeable dip as we progress to
the subsequent bracket, followed by a gradual recovery in the middle age brackets. The revenue
peaks significantly in the 42-46 and 52-56 age intervals, indicating the highest average revenue
within these age ranges. This peak is followed by a declining trend in the subsequent age brackets,
with a more pronounced drop in the last interval shown on the graph.

III. CONCLUSION AND RECOMMENDATION


The analysis of age and revenue relationships, as depicted through natural cubic spline
models, reveals a non-linear dynamic that challenges traditional linear regression approaches.
Based on the results and discussion above, a peak in revenue generation is observed within the
52-56 age bracket, indicating this demographic's significant contribution compared to others.
This peak is followed by a noticeable decline in the subsequent age groups from 57 to 71,
suggesting a downward trend in revenue as consumers advance beyond their mid-fifties.

Examining male consumers separately, the data shows a similar non-linear pattern, with
the cubic spline model fitting better and low R-squared values suggesting that age is not a strong
predictor of revenue for this demographic. Revenue variability across age brackets indicates no
single age dominance in revenue generation for males. Similarly, female consumers also

10
AMAT 110: Mathematical Modeling 10 January 2024
FINAL PAPER

demonstrate a non-linear age-revenue relationship with significant revenue peaks in the 42-46
and 52-56 age brackets, again declining after the latter bracket. These findings suggest a nuanced
marketing approach, considering the complex age-revenue relationship rather than
straightforward age-targeted strategies.

This implies that the high revenue in the 52-56 age bracket could reflect greater
disposable income, warranting targeted marketing to sustain this demographic's contribution.
The post peak revenue decline may entail many factors in business, necessitating tailored business
strategies.

Sex-specific analysis reveals different responses to marketing between male and female
consumers, highlighting the potential benefits of sex-based segmentation. The significant revenue
fluctuations at certain age intervals for both sexes (male and female) underscore the need to
investigate what drives consumer spending within those groups. In summary, this study gives the
importance of accounting for both age and sex in consumer revenue trend analysis. Strategies
must address the non-linear nature of these relationships, focusing on age brackets with high
revenue potential and developing methods to counteract the spending decrease among older
consumers.

In addition, based on our study’s findings on the consumers’ spending habits based on the
analysis on the age-related revenue trends and sex-based data aggregation approach, we have the
following recommendations:

i. Focus marketing efforts on the 52-56 age group, which shows the highest revenue
generation. Tailored marketing strategies could be more effective for this demographic.
ii. Given the decline in spending in older age groups, consider developing products or
services that cater to the needs and preferences of older consumers.
iii. Utilize the insights gained from the sex-based spending trends to develop sex-specific
marketing and product strategies.
iv. Explore further methods for model fitting that could be used in consumer data, like
purchase frequency, product preferences, and lifestyle choices, to gain more nuanced
insights into consumer behavior.

IV. REFERENCES
Bahl, V. (2022). Analyzing customer spending habits. Kaggle. Retrieved from
https://www.kaggle.com/datasets/thedevastator/analyzing-customer-spending-habits-
to-improve-sa?fbclid=IwAR3N3SqhVdD2Pb2lzo6Sbxb1TB3-
r4eGiEU3ry1rDD16rXyBaQJ2BmiqPOU
Emami, A. (2017). Gender risk preference in entrepreneurial opportunity: evidence from Iran.
International Journal of Entrepreneurship and Small Business, 30(2). Retrieved from
https://doi.org/10.1504/IJESB.2017.10002035
Li, S., Glass, R., & Records, H. (2008). The Influence of Gender on New Technology Adoption
and Use–Mobile Commerce. Journal of Internet Commerce, 7(2), 270-289. Retrieved
from https://doi.org/10.1080/15332860802067748

11
AMAT 110: Mathematical Modeling 10 January 2024
FINAL PAPER

Lin, X., Featherman, M., Brooks, S. L., & Hajli, N. (2019). Exploring Gender Differences in Online
Consumer Purchase Decision Making: An Online Product Presentation Perspective.
Information Systems Frontiers, 21(5). Retrieved from https://doi.org/10.1007/s10796-
018-9831-1
Shukla, U. (2023). Aging and Consumer Behavior. Tutorialspoint. Retrieved from
https://www.tutorialspoint.com/aging-and-consumer-
behavior?fbclid=IwAR3mmJZC7ddHfOWiEnkOzVp2AzuSxipr_6jmnM2gp1zXcubM0SU2J
UHmeoY#:~:text=As%20people%20age%2C%20their%20cognitive,preferences%20co
mpared%20to%20younger%20consumers
Slabá, M. (2019). The impact of age on the customers buying behaviour and attitude to price.
Littera Scripta, 12(2). Retrieved from
https://doi.org/10.36708/Littera_Scripta2019/2/11
Statista Consumer Insights. (2023). How Age Shapes Your Shopping Habits: Insights from U.S.
Online Shoppers. Ecommercedb. Retrieved from
https://ecommercedb.com/insights/how-age-shapes-your-shopping-habits-insights-
from-u-s-online-
shoppers/4446?fbclid=IwAR0_AiCQFgFQd8zUYiGsz6ENugEjMhI2LcH2uP5KZ0fShyFiVF
m_CPnwN6w

12
AMAT 110: Mathematical Modeling 10 January 2024
FINAL PAPER

APPENDIX
I. MATLAB Code for Cubic Splines:
% Data points
x = []; % Replace with x-coordinates
y = []; % Replace with y-coordinates

% Compute the cubic spline interpolation


pp = spline(x, y);

% Fine grid for plotting


xx = linspace(min(x), max(x), 100);

% Evaluate the spline on the fine grid


yy = ppval(pp, xx);

% Plotting the spline


figure;
plot(x, y, 'o', xx, yy, '-');
title('Cubic Spline Interpolation');
xlabel('Interval No.');
ylabel('Average Revenue (in USD)');
legend('Data Points', 'Cubic Spline', 'Location', 'best');
grid on;

% Extracting and printing spline coefficients


[pieces, order, dim] = size(pp.coefs);
fprintf('Cubic Spline Equations:\n');
for i = 1:pieces
fprintf('Segment %d: ', i);
coefs = pp.coefs(i, :);
for j = 1:order
% Print coefficients in descending order
fprintf('%+.2f*x^%d ', coefs(j), order-j);
end
fprintf('\n');
end

13

You might also like