UPI Study › Courses › Discrete Mathematics › Free lessons › Lesson 6.5 Free with a free account
Applied Discrete Probability Problems
Discrete Mathematics · Chapter 6: Random Variables and Expected ValueSection 6.5 · lesson 39 of 8710 min · free with a free account
Free preview
Create a free account to keep watching
It takes a minute and costs nothing. Your free account unlocks all of Chapter 1 and 3 more lessons of Discrete Mathematics.
Lesson complete
Earn the 4 college credits for Discrete Mathematics
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: Probability in Dice Games →← Empirical Discrete Probability DistributionsNext lesson: Probability in Dice Games →
In this lesson
Random variables, expected value, and models against data - on one real problem.
- Validate a distribution and compute its expected value
- Rescale and combine expected values
- Check a theoretical model against empirical data
- Turn an expected value into a staffing decision
Transcript
Everything said in the video, section by section (1,452 words). Read along, or search it.
Random Variables and Expected Value
Applied Discrete Probability Problems
This section closes chapter six by putting every tool from it to work on one problem. No new definitions or theorems appear. Instead, four connected problems use random variables, distributions, and expected value together, the way a working team would. The last problem answers a real staffing question with numbers, instead of a guess.
The Opening Problem
40,000 Transactions a Day
Here's the scenario, an illustrative one. A card-not-present payment processor screens about forty thousand transactions a day, through a fraud-detection engine. That engine is built entirely from this chapter's tools. A random variable that counts a discrete outcome. A P M F that assigns weight to each possible value. And an expected value that turns the spread of possibilities into a single planning number. Each idea is clean and self-contained on its own. But in practice, the engineers use all of them together, on the same problem, in the same sitting. That's the skill this section practices. And it ends with the staffing question the operations lead started with.
Formulas at a Glance
What the Problems Use
Here's what the problems use. A valid P M F has every probability at least zero, and they sum to one. That's from section six point one. The expected value is the sum of each value times its probability, from section six point two. And two properties of expected value, stated here. First, rescaling. The expected value of a X plus b is a times the expected value of X, plus b. Second, the expected value of a sum is the sum of the expected values. That holds for any two random variables on the same experiment, whether or not they're independent.
6.5.1 Building the Random Variable
How Many Checks Does a Transaction Fail?
First problem. The rule engine screens every transaction against three checks. An unusual shipping location, an unusually large amount for the account, and a newly added payment method. Let X be the number of checks a transaction fails. The fraud team supplies a distribution from a year of transaction history. Zero failed checks with probability zero point five five, one with zero point three, two with zero point one two, and three with zero point zero three. Step one, verify it. Every probability is non-negative, and they sum to exactly one. So it's valid, and can be used. Step two, the expected value. Zero, plus zero point three, plus zero point two four, plus zero point zero nine. That's zero point six three flags.
Figure 6.5.1
0.63 Flags - Between the Bars
Here's that P M F, with the expected value marked by the dashed line. A typical transaction triggers zero point six three flags on average. The line falls between the bars for zero and one. No single transaction can actually take that value. And that's exactly the point of an expected value. It summarizes the whole distribution, not any one outcome.
Rescale, Then Scale Up
From Flags to Dollars
Step three, a linear transformation. Each triggered flag costs the fraud team four dollars fifty in analyst review time. So the review cost is four fifty times X. By the rescaling property, its expected value is four fifty times zero point six three. That's about two dollars eighty-four per transaction. Step four, scale to the operational decision. At forty thousand transactions a day, that's one hundred thirteen thousand, four hundred dollars of expected review labor per day. Every step used a tool already built. A validity check, an expected value, and a linear transformation, chained into one operational figure.
6.5.2 The Theoretical Model
A 60/40 Router, 2 Calls
Second problem. The processor's router splits identity-verification calls between two backend services, weighted by capacity. Sixty percent go to service A, and forty percent to service B. Let X be how many of the next two independent calls go to service A. Build the theoretical distribution by listing outcomes. A then A has probability zero point six times zero point six, which is zero point three six. A then B, and B then A, each have zero point two four. And B then B has zero point one six. Grouping by the number of A's gives zero point one six for none, zero point four eight for one, and zero point three six for two. They sum to one. The theoretical expected value is zero point four eight, plus two times zero point three six. That's one point two.
6.5.2 The Empirical Check
500 Logged Call-Pairs
Now build the empirical distribution from real data. The engineers pulled five hundred randomly sampled call pairs from two weeks of production logs. Seventy-eight pairs gave zero routings to A, two hundred forty-two gave one, and one hundred eighty gave two. That's all five hundred. Dividing by five hundred gives relative frequencies of zero point one five six, zero point four eight four, and zero point three six. They sum to one, so it's valid too. Its expected value is one point two zero four. The theoretical and empirical values differ by only zero point zero zero four. That close agreement is evidence, not proof, that the assumptions describe what the router is actually doing.
Table 6.5.1
Theoretical Versus Empirical Models
This table compares the two approaches, since choosing between them comes up again and again in applied work. A theoretical model is built from a sample space, under stated assumptions. It needs no data, and it's exact given those assumptions, however small the sample. But it can't tell you whether its own assumptions still match reality. A stale assumption gives a confidently wrong answer. An empirical model is built from observed data. It can be noisy with small samples, and it can't predict conditions the data never covered. In practice, the theoretical model is best for planning, or as a benchmark. The empirical one is best for ongoing monitoring, to flag when live behavior drifts.
6.5.3 Combining 2 Random Variables
An Account-Risk Score, Added In
Third problem. Alongside X, the engine computes a second random variable, Y. It's an account-risk score, built from an entirely separate source. Account age, prior chargebacks, and login history. Y is zero with probability zero point seven, one with zero point two four, and two with zero point zero six. That sums to one. Its expected value is zero point two four plus zero point one two, which is zero point three six. The combined score that decides whether a transaction is held for review is T, equal to X plus Y. By the sum property, its expected value is zero point six three plus zero point three six. That's zero point nine nine combined risk points per transaction.
A Common Mix-Up
Correlated? Linearity Still Holds
It's worth pausing on what that shortcut did, and didn't, require. X and Y are almost certainly correlated in real data. A brand-new account is more likely to also trip the new payment method flag. The sum property was applied anyway, without checking that. Because it holds for any two random variables on the same experiment, independent or not. A colleague might object that the shortcut only works for unrelated systems. That's a common mix-up. Even if the two scores came from the exact same subsystem, and moved together perfectly, the expected value of T would still be exactly zero point nine nine. Where dependence does matter is in measures of spread, like variance. Not in the expected value.
6.5.4 The End-to-End Decision
How Many Analysts?
Fourth, the end-to-end decision. The operations lead originally staffed fraud review with an informal estimate of about ten senior analysts, made before the combined model existed. Each transaction generates an expected zero point nine nine risk points. Across forty thousand transactions a day, that's thirty-nine thousand, six hundred risk points. Historical productivity data assigns one senior analyst per three thousand risk points of daily review. So the team needs thirty-nine thousand six hundred, over three thousand. That's thirteen point two analysts. Nobody can schedule zero point two of an analyst. And understaffing the expected workload is the more expensive mistake. So round up, to fourteen. Thirteen would leave the queue short on an average day, before accounting for any busier day. The informal estimate of ten understaffed the team by four analysts. Each piece of the toolkit changed the answer to the same operational question.
Takeaways
The Whole Toolkit, One Answer
To summarize. Before using any P M F, check that every probability is non-negative and that they sum to one. The validity check comes first, every time. Expected value is computed the same way, whether the distribution is theoretical or empirical. Linearity, for rescaling and for sums, applies regardless of independence. That makes it one of the most reliable shortcuts available. And expected value isn't the end of an exercise. It's the number that turns a probability model into a decision, about cost, staffing, or risk. Here's something to think about. Suppose a data-center reconfiguration silently changes the real routing split to fifty-fifty, and nobody updates the sixty-forty model. Would the theoretical P M F, or the empirical P M F, reflect the change first? And what does that suggest about when a persistent, sizeable gap between prediction and data should be treated as a warning sign, rather than ordinary noise?
About Discrete Mathematics at UPI Study
Discrete Mathematics (Math 230) is a self-paced online course of 87 video lessons in 13 chapters, from logic and proof to counting, probability, graph theory and trees. It carries a NCCRS credit recommendation for 4 semester credits.
Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Enroll now → Course details Download the syllabus Every course with PRO →
Why take it here
Why students take Discrete Mathematics with UPI Study
Where the credit goes
Universities that work with NCCRS
Discrete Mathematics carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.
FAQ
Questions students ask us
About Applied Discrete Probability Problems
How do you check that a probability distribution is valid and then find its expected value?
How do you rescale expected values or add them together?
How do you check a theoretical probability model against empirical data?
How do you turn an expected value into a staffing decision?
About the Discrete Mathematics course
How many college credits is Discrete Mathematics?
How much does Discrete Mathematics cost and what is included?
Which universities accept UPI Study credits?
How long does Discrete Mathematics take?
How are the exams done?
How do my credits reach my college?
Ready for the full course? Earn 4 credits in Discrete Mathematics.
87 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.
4 credits · NCCRSEnroll →