Skip to main content

Posts

Showing posts from September, 2014

Probability Theory Problems

Let's have fun on probability theory, here is my first problem set in the said subject. Problems It was noted that statisticians who follow the deFinetti school do not accept the Axiom of Countable Additivity, instead adhering to the Axiom of Finite Additivity. Show that the Axiom of Countable Additivity implies Finite Additivity. Although, by itself, the Axiom of Finite Additivity does not imply Countable Additivity, suppose we supplement it with the following. Let $A_1\supset A_2\supset\cdots\supset A_n\supset \cdots$ be an infinite sequence of nested sets whose limit is the empty set, which we denote by $A_n\downarrow\emptyset$. Consider the following: Axiom of Continuity: If $A_n\downarrow\emptyset$, then $P(A_n)\rightarrow 0$ Prove that the Axiom of Continuity and the Axiom of Finite Additivity imply Countable Additivity. Prove each of the following statements. (Assume that any conditioning event has positive probability.) If $P(B)=1$, then $P(A|B)=P(A)$ f...

R: k-Means Clustering on Imaging

Enough with the theory we recently published, let's take a break and have fun on the application of Statistics used in Data Mining and Machine Learning, the k -Means Clustering. k-means clustering is a method of vector quantization , originally from signal processing, that is popular for cluster analysis in data mining. k -means clustering aims to partition n observations into k clusters in which each observation belongs to the cluster with the nearest mean, serving as a prototype of the cluster. (Wikipedia, Ref 1.) We will apply this method to an image, wherein we group the pixels into k different clusters. Below is the image that we are going to use, Colorful Bird From Wall321 We will utilize the following packages for input and output: jpeg - Read and write JPEG images; and, ggplot2 - An implementation of the Grammar of Graphics.

Lebesgue Measure and Outer Measure Problems

More proving, still on Real Analysis. This is my solution and if you find any errors, do let me know. Problems Lebesgue Measure : Let $\mu$ be set function defined for all set in $\sigma$-algebra $\mathscr{F}$ with values in $[0,\infty]$. Assume $\mu$ is countably additive over countable disjoint collections of sets in $\mathscr{F}$. Prove that if $A$ and $B$ are two sets in $\mathscr{F}$, with $A\subseteq B$, then $\mu(A)\leq \mu(B)$. This property is called monotonicity . Prove that if there is a set $A$ in the collection $\mathscr{F}$ for which $\mu(A)<\infty$, then $\mu(\emptyset)=0$. Let $\{E_{k}\}_{k=1}^{\infty}$ be a countable collection of sets in $\mathscr{F}$. Prove that $\mu\left(\displaystyle\bigcup_{k=1}^{\infty}E_{k}\right)\leq \displaystyle\sum_{k=1}^{\infty}\mu(E_k)$ Lebesgue Outer Measure : By using property of outer measure, prove that the interval $[0,1]$ is not countable. Let $A$ be the set of irrational numbers in the interval $[0,1]$. Prove that $...

Translation Invariant of Lebesgue Outer Measure

Another proving problem, this time on Real Analysis. Problem Prove that the Lebesgue outer measure is translation invariant. (Use the property that, the length of an interval $l$ is translation invariant.) Solution Proof . The outer measure is translation invariant if for $y\in \mathbb{R}$, \begin{equation}\nonumber \mu^{*}(A)=\mu^{*}(A+y) \end{equation} Hence, we need to show that Case 1: $\mu^{*}(A)\leq \mu^{*}(A+y)$; and Case 2: $\mu^{*}(A+y)\leq \mu^{*}(A)$. Case 1 : Consider a countable collection $\{I_n\}_{n=1}^{\infty}$, and let \begin{equation}\nonumber W = \left\{\displaystyle\sum_{n=1}^{\infty}l(I_n)\mid A\subseteq\displaystyle\bigcup_{n=1}^{\infty}I_n\right\} \end{equation} Then the outer measure of $A$ is, \begin{equation}\nonumber \mu^{*}(A)=\inf\,\{W\}. \end{equation}

R: Image Analysis using EBImage

Currently, I am taking Statistics for Image Analysis on my masteral, and have been exploring this topic in R. One package that has the capability in this field is the EBImage from Bioconductor , which will be showcased in this post. Installation For those using Ubuntu, you may likely to encounter this error: It has something to do with the tiff.h C header file , but it's not that serious since mytechscribblings has an effective solution for this, do check that out. Importing Data To import a raw image, consider the following codes:

Monotonic Sequential Continuity

This problem is the continuation of my previous post on Monotonic Sequence. Problem Prove the following: If $A_k$ is monotone, then \begin{equation} \mathrm{P}\left(\displaystyle\lim_{n\to\infty} A_n\right)=\displaystyle\lim_{n\to \infty}\mathrm{P}(A_n). \end{equation} Solution Proof . If $\{A_k\}$ is monotone, then \begin{equation}\nonumber \mathrm{P}\left(\lim_{n\to \infty} A_n\right) = \begin{cases} \displaystyle\mathrm{P}\left(\bigcup_{k=1}^\infty A_k\right)&\text{if}\;\{A_k\}\;\text{is expanding}\\ \displaystyle\mathrm{P}\left(\bigcap_{k=1}^\infty A_k\right)&\text{if}\;\{A_k\}\;\text{is contracting} \end{cases}. \end{equation} So if $A_k$ is expanding, then we can write $\displaystyle\bigcup_{k=1}^\infty A_k$ as disjoint unions, \begin{eqnarray} \displaystyle\bigcup_{k=1}^\infty A_k &=& A_1\cup (A_2\cap A_1^c)\cup (A_3\cap A_2^c)\cup \cdots\nonumber\\ &=& A_1\cup (A_2\backslash A_1)\cup (A_3\backslash A_2)\cup \cdots\nonumber \end{eqnarray}