Skip to content
Learn Netverks

Lesson

Step 25/36 69% through track

probability-intro

Probability introduction

Last reviewed May 28, 2026 Content v20260528
Track mode
server_script
Means
Server runner
Reading
~1 min
Level
intermediate

This lesson

An orientation to the R track—how the compiled playground works, core vocabulary, and what you will practice next.

You need a clear map of the R track so vectors, data frames, factors, and the tidyverse mindset do not feel like magic.

You will apply Probability introduction in contexts like: Research pipelines, Shiny dashboards, and statistical reporting.

Write R in the editor and click Run on server—the dev runner executes with Rscript; use print() or cat() and base R in playground snippets (tidyverse locally; LEARNING_RUNNER_ENABLED=true). Also read the interview prep blocks.

After basic programming and ideally SQL—pair with Python for ML-heavy roles or stay in R for stats and research pipelines.

R includes distributions via d*, p*, q*, r* functions—density, probability, quantile, and random generation for normal, binomial, and more.

Normal distribution

print(pnorm(1.96))
print(qnorm(0.975))
set.seed(42)
print(rnorm(5))

Reproducible randomness

set.seed() fixes pseudo-random streams—critical for reproducible simulations and tests.

Important interview questions and answers

  1. Q: What does pnorm give?
    A: Cumulative probability P(X <= x) for the standard normal by default.
  2. Q: Why set.seed?
    A: Same seed yields identical random draws—needed for reproducible research.

Self-check

  1. What prefix generates random draws?
  2. What does qnorm(0.975) represent?

Tip: Always set.seed() before simulations you publish or regression-test.

Interview prep

rnorm vs rbinom?

rnorm continuous normal draws; rbinom discrete binomial trials.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs on the configured server runner (dev: npm run runner with LEARNING_RUNNER_ENABLED=true). Output appears below the editor.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • sample() vs runif?
  • set.seed why?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump