<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>r-programming on Dimitris Kokoretsis</title>
    
    
    
    <link>https://dimitris.netlify.app/tags/r-programming/</link>
    <description>Recent content in r-programming on Dimitris Kokoretsis</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 13 May 2026 00:00:00 +0000</lastBuildDate>
    
	<atom:link href="https://dimitris.netlify.app/tags/r-programming/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>The birthday problem — Part 3: Calculating in steps</title>
      <link>https://dimitris.netlify.app/posts/birthday-problem-3/</link>
      <pubDate>Wed, 13 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://dimitris.netlify.app/posts/birthday-problem-3/</guid>
      <description>
        
          &lt;img src=&#34;https://dimitris.netlify.app/posts/birthday-problem-3/cover.png&#34;/&gt;
          
        
        
        
          “Good, fast, cheap. Choose two.” — expression of a universal sentiment: quality and precision are expensive and take time.
This is the third and final part of the series on the birthday problem:
What’s the probability that two students in a classroom share a common birthday?
After mostly failing in part 1, we reached approximate answers in part 2. In this part, we will
find the true pattern of the probability, translate it into code for precise calculations, and look back on the series through the prism of project management.
          
        
        </description>
    </item>
    
    <item>
      <title>The birthday problem — Part 2: The statistical shortcut</title>
      <link>https://dimitris.netlify.app/posts/birthday-problem-2/</link>
      <pubDate>Mon, 13 Jan 2025 00:00:00 +0000</pubDate>
      
      <guid>https://dimitris.netlify.app/posts/birthday-problem-2/</guid>
      <description>
        
          &lt;img src=&#34;https://dimitris.netlify.app/posts/birthday-problem-2/thumbnail.gif&#34;/&gt;
          
        
        
        
          In this post, we will answer a question that we previously failed at:
What is the probability that two students in a classroom share the same birthday?
This is described as a paradox because for a classroom of realistic size, the probability is surprisingly higher than intuitively expected.
Previously, we could only solve this for very small classrooms of 2 or 3 students. The reason? Too much data.
We will now get around this obstacle by the means of random sampling.
          
        
        </description>
    </item>
    
    <item>
      <title>How to get data from websites (fast)</title>
      <link>https://dimitris.netlify.app/posts/web-scraping/</link>
      <pubDate>Fri, 05 Jan 2024 00:00:00 +0000</pubDate>
      
      <guid>https://dimitris.netlify.app/posts/web-scraping/</guid>
      <description>
        
          &lt;img src=&#34;https://dimitris.netlify.app/posts/web-scraping/thumbnail.gif&#34;/&gt;
          
        
        
        
          So far in this blog, we&amp;rsquo;ve tried to answer questions by creating &amp;ldquo;fake&amp;rdquo; artificial data, and finding patterns in it. That&amp;rsquo;s fun and all, but sometimes we just need data from the real world. Take for example the simple question:
Which are the 10 most densely populated countries?
In this post we&amp;rsquo;ll focus on data collection instead of analysis. As long as the data is accessible and somewhat structured in a webpage, we&amp;rsquo;ll see how to extract it for further processing and analysis - without tedious copy-pasting but with a code-based process called web scraping.
          
        
        </description>
    </item>
    
    <item>
      <title>Football goals and coin flips: discovering the law of rare events</title>
      <link>https://dimitris.netlify.app/posts/football-goals/</link>
      <pubDate>Mon, 08 May 2023 00:00:00 +0000</pubDate>
      
      <guid>https://dimitris.netlify.app/posts/football-goals/</guid>
      <description>
        
          &lt;img src=&#34;https://dimitris.netlify.app/posts/football-goals/images/intro_figure.gif&#34;/&gt;
          
        
        
        
          “To state a theorem and then to show examples of it is literally to teach backwards.” (E. Kim Nebeuts)
Ever felt excited for discovering something that is already kinda known? Not necessarily for the discovery itself, but because you achieved it on your own and actually overcame an obstacle with it.
This is how I feel about this story, and hopefully you will too. Starting from a small puzzle about football, we’re going to build the solution from scratch and see how -without knowing it- we just applied the law of rare events.
          
        
        </description>
    </item>
    
    <item>
      <title>The birthday problem — Part 1: When counting fails</title>
      <link>https://dimitris.netlify.app/posts/birthday-problem-1/</link>
      <pubDate>Wed, 30 Nov 2022 00:00:00 +0000</pubDate>
      
      <guid>https://dimitris.netlify.app/posts/birthday-problem-1/</guid>
      <description>
        
          &lt;img src=&#34;https://dimitris.netlify.app/posts/birthday-problem-1/images/intro_animation.gif&#34;/&gt;
          
        
        
        
          After the &amp;ldquo;toy problem&amp;rdquo; of the previous post, I decided to take a chance at a more tangible, real-world question. Consider this one:
What is the probability that two students in a classroom share the same birthday?
Intuitively (and correctly), you might think it depends on the total number of students. But for a realistic classroom of around 20 students, the probability should be quite low - whatever &amp;ldquo;low&amp;rdquo; means. After all, how many times have you witnessed that?
          
        
        </description>
    </item>
    
    <item>
      <title>Drawing random biscuits: from probability to data</title>
      <link>https://dimitris.netlify.app/posts/random-biscuits/</link>
      <pubDate>Sun, 28 Aug 2022 00:00:00 +0000</pubDate>
      
      <guid>https://dimitris.netlify.app/posts/random-biscuits/</guid>
      <description>
        
          &lt;img src=&#34;https://dimitris.netlify.app/posts/random-biscuits/thumbnail.png&#34;/&gt;
          
        
        
        
          I stumbled upon a probability exercise when I had just built enough confidence with R scripting, and I was looking for &amp;ldquo;toy problems&amp;rdquo; to play with. It was a simple brain teaser, barely more complicated than the well-known coin toss. I could solve it with pen and paper, but I wanted to squeeze out of it as much as I could.
My central thesis in this post is that, if we formulate our assumptions well, we can turn questions about probability into questions about data.
          
        
        </description>
    </item>
    
  </channel>
</rss>