In: Accounting
FINANCIAL STATEMENT ANALYSIS with R programming:
Scenario: You are a Data Scientist working for a consulting firm. One of your colleagues from the Auditing
department has asked you to help them with financial statement of their organization.
You have been supplied with two vectors of data: monthly revenue and monthly expenses for the financial
year in question.
revenue in 12 months (14574.49, 7606.46, 8611.41, 9175.41, 8058.65, 8105.44, 11496.28, 9766.09,
10305.32, 14379.96, 10713.97, 15433.50)
expenses
in 12 months (12051.82, 5695.07, 12319.20, 12089.72, 8658.57, 840.20, 3285.73, 5821.12,
6976.93, 16618.61, 10054.37, 3803.96)
=============================
Steps + sloutions:
revenue<- c(14574.49, 7606.46, 8611.41, 9175.41, 8058.65, 8105.44, 11496.28, 9766.09,10305.32, 14379.96, 10713.97, 15433.50)
expenses<- c(12051.82, 5695.07, 12319.20, 12089.72, 8658.57, 840.20, 3285.73, 5821.12,
6976.93, 16618.61, 10054.37, 3803.96)
profit for each month : profit<- revenue - expenses
- profit after tax for each month (the tax rate is 30%): ProfitAfterTax<- profit - profit *0.3
- profit margin for each month in percentage (hint: equals profit after tax divided by revenue): ProfitMargin<- round(profitAfterTax / revenue, 2) * 100
==================================
- good months - where the profit after tax was greater than the mean for the year (mean is computed with mean function as mean(x/n)) (5 points)
- bad months - where the profit after tax was less than the mean for the year (5 points)
- the best month - where the profit after tax was max for the year (5 points)
- the worst month - where the profit after tax was min for the year (5 points)
Hints: round() mean() max() min()
Months | Revenue | Expenses | Profit (Revenue- Expenses) | Tax 30% on Profit | Profit After Tax (Profit - Tax) | Profit margin | Profit After Tax Mean | Months | Maximum | Mininum |
Jan | 14,574.49 | 12,051.82 | 2,522.67 | 756.80 | 1,765.87 | 12% | 1,751 | Good Months | ||
Feb | 7,606.46 | 5,695.07 | 1,911.39 | 573.42 | 1,337.97 | 18% | 1,751 | Bad Months | ||
Mar | 8,611.41 | 12,319.20 | (3,707.79) | (1,112.34) | (2,595.45) | -30% | 1,751 | Bad Months | Wrost Month | |
Apr | 9,175.41 | 12,089.72 | (2,914.31) | (874.29) | (2,040.02) | -22% | 1,751 | Bad Months | ||
May | 8,058.65 | 8,658.57 | (599.92) | (179.98) | (419.94) | -5% | 1,751 | Bad Months | ||
Jun | 8,105.44 | 840.20 | 7,265.24 | 2,179.57 | 5,085.67 | 63% | 1,751 | Good Months | ||
Jul | 11,496.28 | 3,285.73 | 8,210.55 | 2,463.17 | 5,747.39 | 50% | 1,751 | Good Months | ||
Aug | 9,766.09 | 5,821.12 | 3,944.97 | 1,183.49 | 2,761.48 | 28% | 1,751 | Good Months | ||
Sep | 10,305.32 | 6,976.93 | 3,328.39 | 998.52 | 2,329.87 | 23% | 1,751 | Good Months | ||
Oct | 14,379.96 | 16,618.61 | (2,238.65) | (671.60) | (1,567.06) | -11% | 1,751 | Bad Months | ||
Nov | 10,713.97 | 10,054.37 | 659.60 | 197.88 | 461.72 | 4% | 1,751 | Bad Months | ||
Dec | 15,433.50 | 3,803.96 | 11,629.54 | 3,488.86 | 8,140.68 | 53% | 1,751 | Good Months | Best Month | |
Total | 128,226.98 | 98,215.30 | 30,011.68 | 9,003.50 | 21,008.18 | 21% |