Bayesian Information Criterion

This note is one of the few notes that was generated with the help of chatgpt. Bayesian Information Criterion (BIC) The Bayesian Information Criterion (BIC) is a model selection criterion that helps compare different statistical models while penalizing model complexity. It is rooted in Bayesian probability theory but is commonly used even in frequentist settings. Mathematically Precise Definition For a statistical model $M$ with $k$ parameters fitted to a dataset $\mathcal{D} = \{x_1, x_2, \dots, x_n\}$, the BIC is defined as: ...

February 2, 2025 · Reading Time: 3 minutes ·  By Xuanqiang Angelo Huang

The Market

Let’s consider first a simple model for apartments in a college. Here we are interested to predict the prices of the rooms, and how we can allocate them to students. For simplicity, we will assume that they are all equal except for the location, which could be inner or outer. Types of variables Economist will say that parameters for a model, i.e. variables that are fixed for some type of analysis exogenous variables, while the variables of interest of a model endogenous variables. In this setting, it could be the location for a certain room. ...

January 24, 2025 · Reading Time: 5 minutes ·  By Xuanqiang Angelo Huang

Parametric Modeling

In this note we will first talk about briefly some of the main differences of the three main approaches regarding statistics: the bayesian, the frequentist and the statistical learning methods and then present the concept of the estimator, compare how the approaches differ from method to method, we will explain maximum likelihood estimator and the Rao-Cramer Bound. Short introduction to the statistical methods Bayesian $$ p(\theta \mid X) = \frac{1}{z}p(X \mid \theta) p(\theta) $$The quantity $P(X \mid \theta)$ could be very complicated if our model is complicated. ...

January 13, 2025 · Reading Time: 11 minutes ·  By Xuanqiang Angelo Huang

Demand

Here we analyze how demand changes when prices and income changes. Types of Goods Here we will define two main types of Goods: Normal Goods: The demand increases linearly with the income. Inferior or Ordinary Goods: The demand decreases when the income is higher, one example is low quality food. Necessary Good: The demand is increases sublinearly (e.g. constantly) with respect to the income. Luxury Good: The demand increases more than linearly with the income. Giffen Good: The decrease in price leads to a decrease in demand. Curves of Demand Income offer curve It is quite intuitive to visualize: just expand the income while keeping utility and priced fixed, you will see the optimal point translating along the curve. ...

December 26, 2024 · Reading Time: 2 minutes ·  By Xuanqiang Angelo Huang

Budget and Preferences

Budget A definition for Budget Economist want simple models to start to model things. One of the things we will model here is how do you describe what you can afford about some goods. Budget Set $$ \text{Budget Constraint inequality}:p^{T}x \leq m $$ We define Budget Set to be $P_{p, m} = \left\{ x \in \mathbb{R}^{d} : p^{T}x \leq m\right\}$ Composite Goods $$ p_{1}x_{1} + x_{2} \leq m $$ Where $x_{2} = \sum_{i = 2}^{n} p_{i}x_{i}$. In this case, $x_{2}$ is called composite good, which is a sort of abstraction to simplify some calculus. ...

December 25, 2024 · Reading Time: 9 minutes ·  By Xuanqiang Angelo Huang

Structural Causal Models

Indipendence of Cause and Mechanism The cause and mechanisms shall be separated. One direction is the cause, the other is the mechanism that actuates the effect of the cause. Take for example the altitude and temperature example in (Peters et al. 2017) chapter 2. The distribution of the cause p(a)p(a)p(a) and the mechanism p(t∣a)p(t|a)p(t∣a) that maps it to the effect are independent. Structural Causal Models We say that given two statistical processes $C, E$, where $C$ is the cause and E the effect, then the ...

August 4, 2025 · Reading Time: 1 minute ·  By Xuanqiang Angelo Huang

Softmax Function

Softmax is one of the most important functions for neural networks. It also has some interesting properties that we list here. This function is part of The Exponential Family, one can also see that the sigmoid function is a particular case of this softmax, just two variables. Sometimes this could be seen as a relaxation of the action potential inspired by neuroscience (See The Neuron for a little bit more about neurons). This is because we need differentiable, for gradient descent. The action potential is an all or nothing thing. ...

October 25, 2024 · Reading Time: 3 minutes ·  By Xuanqiang Angelo Huang

Data Plane

Introduzione Data or Control plane Come fanno i router a fare forwarding dei pacchetti? Come fanno a decidere come e dove mandare? Sono le tabelle di instradamento che decidono il prossimo hop del pacchetto. Si può dire di end-to-end perché solamente il sender e receiver andranno a livello applicazione, e leggeranno le cose (se criptato veramente solo loro riescono a fare questo). Funzioni principali Il data plane è la parte che si occupa di fare il forwarding, ossia risponde a domande come “come faccio a mandare in modo efficiente questo pacchetto lì?” mentre il control plane si occupa di fare il routing, ossia risponde a domande “Dove mando il pacchetto che ho?”. ...

August 28, 2024 · Reading Time: 8 minutes ·  By Xuanqiang Angelo Huang

Semantica di un linguaggio

Vincoli sintattici contestuali Intro: dipendenze da contesto I vincoli sintattici non sono esprimibili tramite BNF perché dipendono dal contesto, mentre le grammatiche libere sono per definizione libere da contesto, vogliamo quindi trovare una soluzione a questo problema. Vengono usati metodi Ad-Hoc nella fase di analisi semantica del programma. Grammatiche dipendenti dal contesto Queste grammatiche sono molto più complicate (e lente) rispetto a quelle libere da contesto, quindi è poco pratico e non utilizzabile (tempo esponenziale, quindi non finisce mai). ...

August 28, 2024 · Reading Time: 9 minutes ·  By Xuanqiang Angelo Huang

Algoritmi di ordinamento

Introduzione L’importanza del topic Gli algoritmi di ordinamento sono molto di base per la comprensione dell’ampio raggio degli algoritmi. Utilizzano l’analisi, introducono tecniche di risoluzione dei problemi computazionali come greedy, divide et impera e simile. Permettono un primo uso di astrazioni e l’analisi di sottoproblemi. Il problema Il problema è trovare una permutazione di un insieme di numeri iniziali tale per cui tale insieme di numeri si ordinato: Questo si può fare con qualunque collezione confrontabile fra di loro. ...

August 28, 2024 · Reading Time: 2 minutes ·  By Xuanqiang Angelo Huang