[Link].
III Year - Semester V
Course 12B: Data Science with R
Unit 1: Mathematical & Statistical Foundations (Sample Notes)
1. Sets
Definition: A set is a collection of unique elements.
Example: Students in a class = {A, B, C}.
R Program:
A <- c(1,2,3)
B <- c(3,4,5)
union(A,B)
2. Probability
Definition: Probability measures the chance of an event occurring.
Formula: P(E)=Favourable Outcomes / Total Outcomes.
Example: Probability of getting Head on one coin toss = 1/2.
3. Random Variable
A random variable is a variable whose value depends on the outcome of a random experiment.
Example: Number obtained when rolling a die.
4. Mean
Formula: Mean = Sum of values / Number of values.
Example: Marks = 60,70,80,90,100. Mean = 80.
R Program:
marks <- c(60,70,80,90,100)
mean(marks)
This is a sample. The complete notebook (Units 1–4 with explanations, solved examples, R
programs, diagrams, and important questions) will be much more detailed (150–200 pages).