Module 1 · Mathematical Language and Quantitative Reasoning Lesson 3 of 120

Ratios, Proportions, Rates, and Percentages

Comparing approval rates across merchants.

2:36 clip13:32–16:09 in the full courseWatch on YouTube

Transcript

25 sentences · select one to jump there

Check your understanding

A 2% fee on 100 is how much?

Choose one answer

Code lab

Run it yourself

The lesson source in 7 languages. Edit it, run TypeScript and Python right here, and compare with the expected output.

003-ratios-proportions-rates-and-percentages.ts
Start from GitHub
/**
 * Fintech Math Bootcamp · Lesson 003 of 120
 * Ratios, Proportions, Rates, and Percentages
 * Module 01: Mathematical Language and Quantitative Reasoning
 *
 * Scenario: Comparing approval rates across merchants
 * Rule:     rate = approved / attempted
 *
 * Try it:   A 2% fee on 100 is how much?
 *
 * Lesson article: https://thefintechbuilder.com/financial-mathematics-statistics-and-data-foundations/mathematical-language-and-quantitative-reasoning/ratios-proportions-rates-and-percentages/
 * Free course:    https://courses.thefintechbuilder.com
 * Synthetic teaching example, not financial advice or a production library.
 */

export function lesson003() {
  const approved = 700;
  const attempted = 1000;
  if (attempted <= 0) throw new Error("No denominator");
  const rate = approved / attempted;
  const result = {rate, percent: 100 * rate};
  return result;
}

export const checkedResult = {"rate":0.7,"percent":70};

// Run this file directly: npx tsx lessons/01-mathematical-language-and-quantitative-reasoning/003-ratios-proportions-rates-and-percentages.ts
if (process.argv[1] && import.meta.url.endsWith(process.argv[1].replace(/\\/g, "/").split("/").pop()!)) {
  console.log(JSON.stringify(lesson003(), null, 2));
}

Your output

Press Run to execute the code in your browser.

Expected output

{
  "rate": 0.7,
  "percent": 70
}

Prefer your own machine? Every file is in the course repository · open it in Codespaces.

Lesson notes

The rule

rate = approved / attempted