Basic Concepts of Statistics, Probability and Python

Create a Jupyter notebook and solve each exercise in an individual cell.

Each team must submit the Jupyter notebook and defend it on February 3, 2026. The defense will be carried out by one of the team members chosen at random.

The python libraries allow for this laboratory are: matplotlib and random

Exercise 1: Mean and Median

Write a Python program that calculates the mean and median of a list of numbers.

Exercise 2: Standard Deviation

Write a Python program that calculates the standard deviation of a list of numbers.

Exercise 3: Data Visualization

Write a Python program that uses the matplotlib library to visualize a histogram of a list of numbers.

Exercise 4: Probability Distribution

Write a Python program that calculates the probability of an event occurring given a probability distribution (e.g. normal, binomial).

Exercise 5: Conditional Probability

Write a Python program that calculates the conditional probability of an event occurring given another event.

Exercise 6: Bayes’ Theorem

Write a Python program that applies Bayes’ theorem to update the probability of a hypothesis given new evidence.

Exercise 7: Correlation Coefficient

Write a Python program that calculates the correlation coefficient between two lists of numbers.

Exercise 8: Regression Analysis

Write a Python program that performs a simple linear regression analysis on a dataset.

Exercise 9: Random Number Generation

Write a Python program that generates random numbers from a specified probability distribution (e.g. normal, uniform).

Exercise 10:Function visualization - I

Generate a python code that allows the visualization (in one figure) of the real (blue) part and the imaginary (red) part, magnitude (green) and phase of the following signals: \[f\left(t\right) = e^{-j10 \pi t}\] \[g\left(t\right) = 10cos\left(2 \pi t\right) + j10sin\left(2 \pi t\right)\]

The visualization mus be in the range \(\left[-10, 10\right]\)

Exercise 11: Function visualizartion - II

Generate a python code to show the following step function:

$$f(t) = \[\begin{cases} -t & \text{if } -5 \leq t \leq 0, \\ t & \text{if } 0 \leq t \leq 5, \\ 0 & Otherwise \end{cases}\]

$$

The visualization mus be in the range \(\left[-10, 10\right]\)

Exercise 12: Physionet database

Download a record from the Physionet database EEG Signals from an RSVP Task (itrsvp) and create a script that enables the visualization of all the signals contained in the record. Make sure to use the correct amplitude and time units.