<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/the-beginner-s-guide-to-probability-distributions-pmf-pdf-and-cdf-fanbuuzaf" -->

---
title: The Beginner’s Guide to Probability Distributions: PMF,...
description: A beginner-friendly walkthrough of core probability concepts used in statistics and machine learning: random variables, probability distributions, and the...
canonical: https://daily.dev/posts/the-beginner-s-guide-to-probability-distributions-pmf-pdf-and-cdf-fanbuuzaf
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: The Beginner’s Guide to Probability Distributions: PMF, PDF, and CDF | daily.dev
og:description: A beginner-friendly walkthrough of core probability concepts used in statistics and machine learning: random variables, probability distributions, and the...
og:url: https://daily.dev/posts/the-beginner-s-guide-to-probability-distributions-pmf-pdf-and-cdf-fanbuuzaf
og:image: https://api.daily.dev/og/posts/FanBUUZAF.png
og:image:alt: The Beginner’s Guide to Probability Distributions: PMF, PDF, and CDF
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The Beginner’s Guide to Probability Distributions: PMF, PDF, and CDF

**[Medium](https://daily.dev/sources/medium_js)** · 9 min read · 0 upvotes · 0 comments

## Summary

A beginner-friendly walkthrough of core probability concepts used in statistics and machine learning: random variables, probability distributions, and the three key functions - Probability Mass Function (PMF) for discrete data, Probability Density Function (PDF) for continuous data, and Cumulative Distribution Function (CDF). Explains definitions, validity rules, worked examples (dice rolls, human height), and the mathematical relationships that let you derive PDF and PMF from a CDF via differentiation and differencing.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://ai.plainenglish.io/the-beginners-guide-to-probability-distributions-pmf-pdf-and-cdf-d3f5115d8b4a>

## Questions this post answers

### What is the difference between a PMF and a PDF?

A PMF gives the exact probability that a discrete random variable equals a specific value, such as P(X=4)=1/6 for rolling a 4 on a six-sided die. A PDF applies to continuous random variables, where the probability of any single exact value is zero; instead, probability is found by calculating the area under the PDF curve over an interval, such as the chance a person's height falls between 160 cm and 170 cm.

_Grounding concepts like PMF versus PDF helps when building statistical models, a topic developers track on daily.dev._

### How do you calculate the PMF from a CDF for discrete data?

The probability at a particular value equals the size of the jump in the CDF at that value, expressed as P(X=x) = F(x) - F(x-1). This works because a discrete CDF forms a staircase shape rather than a smooth curve, so no calculus is needed; simply subtract the CDF value at the previous point from the CDF value at the current point.

_Developers connecting distribution math to real modeling code can keep learning resources like this on daily.dev._

### How is the PDF derived from the CDF for continuous random variables?

The PDF is the derivative of the CDF, expressed as f(x) = d/dx F(x). Since a continuous CDF is a smooth curve, taking its derivative at a given point yields the corresponding PDF value at that point, reversing the process of building a CDF by integrating the PDF.

_For developers applying calculus-based probability in data work, daily.dev surfaces more explainers like this._

## Similar posts on daily.dev

- [Learning Statistics for Machine Learning — Part 1: Understanding Probability](https://daily.dev/posts/learning-statistics-for-machine-learning-part-1-understanding-probability-jj7pftmvr) · Medium · 0 upvotes · 0 comments
- [The Geometry of Uncertainty: A Fresh Perspective on Probability Distributions](https://daily.dev/posts/the-geometry-of-uncertainty-a-fresh-perspective-on-probability-distributions-wuippty97) · Medium · 0 upvotes · 0 comments
- [Bayesian statistics for confused data scientists](https://daily.dev/posts/bayesian-statistics-for-confused-data-scientists-vkyv2eh5g) · Hacker News · 1 upvotes · 0 comments

---

Tags: [#machine-learning](https://daily.dev/tags/machine-learning), [#data-science](https://daily.dev/tags/data-science), [#statistics](https://daily.dev/tags/statistics)

[View this post on daily.dev](https://daily.dev/posts/the-beginner-s-guide-to-probability-distributions-pmf-pdf-and-cdf-fanbuuzaf)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"The Beginner’s Guide to Probability Distributions: PMF, PDF, and CDF","url":"https://daily.dev/posts/the-beginner-s-guide-to-probability-distributions-pmf-pdf-and-cdf-fanbuuzaf","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/the-beginner-s-guide-to-probability-distributions-pmf-pdf-and-cdf-fanbuuzaf"},"datePublished":"2026-08-31T04:35:50.740Z","dateModified":"2026-09-14T06:20:11.854Z","description":"A beginner-friendly walkthrough of core probability concepts used in statistics and machine learning: random variables, probability distributions, and the...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4ff37c9c1809381ad7a3b1c7901578a3?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4ff37c9c1809381ad7a3b1c7901578a3?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/the-beginner-s-guide-to-probability-distributions-pmf-pdf-and-cdf-fanbuuzaf","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"machine-learning,data-science,statistics","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"The Beginner’s Guide to Probability Distributions: PMF, PDF, and CDF"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/the-beginner-s-guide-to-probability-distributions-pmf-pdf-and-cdf-fanbuuzaf#faq","mainEntity":[{"@type":"Question","name":"What is the difference between a PMF and a PDF?","acceptedAnswer":{"@type":"Answer","text":"A PMF gives the exact probability that a discrete random variable equals a specific value, such as P(X=4)=1/6 for rolling a 4 on a six-sided die. A PDF applies to continuous random variables, where the probability of any single exact value is zero; instead, probability is found by calculating the area under the PDF curve over an interval, such as the chance a person's height falls between 160 cm and 170 cm. Grounding concepts like PMF versus PDF helps when building statistical models, a topic developers track on daily.dev."}},{"@type":"Question","name":"How do you calculate the PMF from a CDF for discrete data?","acceptedAnswer":{"@type":"Answer","text":"The probability at a particular value equals the size of the jump in the CDF at that value, expressed as P(X=x) = F(x) - F(x-1). This works because a discrete CDF forms a staircase shape rather than a smooth curve, so no calculus is needed; simply subtract the CDF value at the previous point from the CDF value at the current point. Developers connecting distribution math to real modeling code can keep learning resources like this on daily.dev."}},{"@type":"Question","name":"How is the PDF derived from the CDF for continuous random variables?","acceptedAnswer":{"@type":"Answer","text":"The PDF is the derivative of the CDF, expressed as f(x) = d/dx F(x). Since a continuous CDF is a smooth curve, taking its derivative at a given point yields the corresponding PDF value at that point, reversing the process of building a CDF by integrating the PDF. For developers applying calculus-based probability in data work, daily.dev surfaces more explainers like this."}}]}
```

