Represents a ratio value that occurs at regular time intervals, enabling conversion between different time periods.
This class combines a base time interval (from the Interval1` class) with a ratio value to calculate
total ratio amounts across different time periods.
// Example: 70% conversion rate every 2 weeksvar conversionInterval = new RatioInterval<double>(0.70, 2, IntervalType.Weeks);// How many 2-week intervals are there per month?decimal intervalsPerMonth = conversionInterval.PerMonth(); // ~2.17 intervals// What's the total conversion ratio per month?decimal totalConversionPerMonth = conversionInterval.RatioPerMonth(); // ~1.52 (0.70 × 2.17)// Daily breakdowndecimal totalConversionPerDay = conversionInterval.RatioPerDay(); // ~0.05 (0.70 × 0.071)
// Widget production: 1 widget every 1.5 hours, total from 100 units of material per dayvar production = new Interval<double>(1.5, IntervalType.Hours);decimal totalPerDay = production.PerDay(100); // 1600 widgets per day (16 * 100)
// Widget production: 1 widget every 1.5 hours, total from 100 units of material per hourvar production = new Interval<double>(1.5, IntervalType.Hours);decimal totalPerHour = production.PerHour(100); // 66.67 widgets per hour (1/1.5 * 100)
// Widget production: 1 widget every 90 minutes, total from 100 units of material per minutevar production = new Interval<int>(90, IntervalType.Minutes);decimal totalPerMinute = production.PerMinute(100); // 1.11 widgets per minute (1/90 * 100)
// Widget production: 1 widget every 3 days, total from 200 units of material per monthvar production = new Interval<int>(3, IntervalType.Days);decimal totalPerMonth = production.PerMonth(200); // 2000 widgets per month (10 * 200)
// Widget production: 1 widget every 2 days, total from 50 units of material per weekvar production = new Interval<int>(2, IntervalType.Days);decimal totalPerWeek = production.PerWeek(50); // 175 widgets per week (3.5 * 50)
// Widget production: 1 widget every 1 week, total from 500 units of material per yearvar production = new Interval<int>(1, IntervalType.Weeks);decimal totalPerYear = production.PerYear(500); // 26071 widgets per year (52.14 * 500)
Calculates the total ratio value per day based on the interval and ratio.
This method multiplies the interval frequency (how many intervals occur per day) by the ratio value.
// 0.75 ratio every 6 hours = 0.75 * 4 = 3.0 ratio per dayvar interval = new RatioInterval<double>(0.75, 6, IntervalType.Hours);decimal ratioPerDay = interval.RatioPerDay();
// 70% conversion every month, total conversions from 30 customers per dayvar conversion = new RatioInterval<double>(0.70m, 1, IntervalType.Months);decimal conversionsPerDay = conversion.RatioPerDay(30); // ~0.69 conversions per day
Calculates the total ratio value per hour based on the interval and ratio.
This method multiplies the interval frequency (how many intervals occur per hour) by the ratio value.
// 0.7 ratio every 1.5 hours = 0.7 * (60/90) = 0.467 ratio per hourvar interval = new RatioInterval<double>(0.7, 1.5, IntervalType.Hours);decimal ratioPerHour = interval.RatioPerHour();
// 70% conversion every 1.5 hours, total conversions from 100 leads per hourvar conversion = new RatioInterval<double>(0.70m, 1.5, IntervalType.Hours);decimal conversionsPerHour = conversion.RatioPerHour(100); // ~46.67 conversions per hour
Calculates the total ratio value per minute based on the interval and ratio.
This method multiplies the interval frequency (how many intervals occur per minute) by the ratio value.
// 0.5 ratio every 2 hours = 0.5 * (60/120) = 0.25 ratio per minutevar interval = new RatioInterval<double>(0.5, 2, IntervalType.Hours);decimal ratioPerMinute = interval.RatioPerMinute();
// 70% conversion every month, total conversions from 1000 leads per minutevar conversion = new RatioInterval<double>(0.70m, 1, IntervalType.Months);decimal conversionsPerMinute = conversion.RatioPerMinute(1000); // ~0.016 conversions per minute
Calculates the total ratio value per month based on the interval and ratio.
This method multiplies the interval frequency (how many intervals occur per month) by the ratio value.
// 0.6 ratio every 1 week = 0.6 * 4.34 = 2.6 ratio per monthvar interval = new RatioInterval<double>(0.6, 1, IntervalType.Weeks);decimal ratioPerMonth = interval.RatioPerMonth();
// 60% conversion every week, total conversions from 100 leads per monthvar conversion = new RatioInterval<double>(0.60m, 1, IntervalType.Weeks);decimal conversionsPerMonth = conversion.RatioPerMonth(100); // 260 conversions per month
Calculates the total ratio value per week based on the interval and ratio.
This method multiplies the interval frequency (how many intervals occur per week) by the ratio value.
// 0.8 ratio every 2 days = 0.8 * 3.5 = 2.8 ratio per weekvar interval = new RatioInterval<double>(0.8, 2, IntervalType.Days);decimal ratioPerWeek = interval.RatioPerWeek();
// 80% conversion every 2 days, total conversions from 50 leads per weekvar conversion = new RatioInterval<double>(0.80m, 2, IntervalType.Days);decimal conversionsPerWeek = conversion.RatioPerWeek(50); // 140 conversions per week
Calculates the total ratio value per year based on the interval and ratio.
This method multiplies the interval frequency (how many intervals occur per year) by the ratio value.
// 0.9 ratio every 3 months = 0.9 * 4 = 3.6 ratio per yearvar interval = new RatioInterval<double>(0.9, 3, IntervalType.Months);decimal ratioPerYear = interval.RatioPerYear();
// 90% conversion every 3 months, total conversions from 1000 leads per yearvar conversion = new RatioInterval<double>(0.90m, 3, IntervalType.Months);decimal conversionsPerYear = conversion.RatioPerYear(1000); // 3600 conversions per year