Skip to main content

Posts

Showing posts with the label LaTeX

Multiple Random Variables Problems

To probability lovers, I just want to share (and discuss) few simple problems I solved in Chapter 4 of Casella, G. and Berger, R.L. (2002). Statistical Inference . A random point $(X,Y)$ is distributed uniformly on the square with vertices $(1, 1),(1,-1),(-1,1),$ and $(-1,-1)$. That is, the joint pdf is $f(x,y)=\frac{1}{4}$ on the square. Determine the probabilities of the following events. $X^2 + Y^2 < 1$ $2X-Y>0$ $|X+Y| Solutions: $X^2 + Y^2 < 1$ We need to consider the boundary of this inequality first in the unit square, so below is the plot of $X^2 + Y^2 = 1$,

R: Principal Component Analysis on Imaging

Ever wonder what's the mathematics behind face recognition on most gadgets like digital camera and smartphones? Well for most part it has something to do with statistics. One statistical tool that is capable of doing such feature is the Principal Component Analysis (PCA). In this post, however, we will not do (sorry to disappoint you) face recognition as we reserve this for future post while I'm still doing research on it. Instead, we go through its basic concept and use it for data reduction on spectral bands of the image using R. Let's view it mathematically Consider a line $L$ in a parametric form described as a set of all vectors $k\cdot\mathbf{u}+\mathbf{v}$ parameterized by $k\in \mathbb{R}$, where $\mathbf{v}$ is a vector orthogonal to a normalized vector $\mathbf{u}$. Below is the graphical equivalent of the statement:

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...

LaTeX: Using gnuplot for Plotting Functions

$\mathrm{\LaTeX}$ has the capability to draw beautiful graphics. This feature is possible with Ti k Z package. Here is the plot of $f(x) = x$, In $\mathrm{\LaTeX}$, everything has to be coded. From axes, to labels, to points on the $xy$-plane; that explains why four lines of codes, only for single, very simple plot.

LaTeX: How to install TeX Live - qtree package in Ubuntu 12.10

There is a question on TeX - StackExchange that has no direct solution to the installation of the qtree - TeX Live package in Ubuntu. And I want to answer that in this post, then just drop the link of this article to the comment section of the said query. So here is what I did: Open the Ubuntu Dash , and search for Ubuntu Software Center ; In the Software Center, search for qtree ; Select the first entry ( Humanities Packages ), and click on More Info to confirm if qtree is indeed included in this item; Finally, click . There you go, you can try it now. Here is a simple Statistics problem from Elementary Statistics Book of MSU-IIT Department of Mathematics and Statistics that uses tree diagram,

LaTeX: Itemize and Enumerate

Previously, we talk about paragraph, spacing, and indentation . What about listing in $\mathrm{\LaTeX}$? Just like MS Word, $\mathrm{\LaTeX}$ has both bullet and alphanumeric environment for listing. Bullet listing is constructed inside the itemize domain. For example, The codes above generate list with sublists. The outer list uses bullet for entries (Line 5 and Line 14) while the sublists (Line 7-12 and Line 16-20) use hyphen. The itemize domain can have up to three nested lists, each with a particular character for entries. Here is something worth to explore, This returns Output 1, the first list with entries Line 5-6 uses bullets, then a sublist under Line 6 with two entries (Line 8-9) uses hyphen, another subsublist uses asterisk, and further down to subsubsublist, dot or period is utilize. If we go further to the fourth nested list we get error that says, "Too deeply nested".

LaTeX: Paragraph, Spacing, and Indentation

Let us visit the history of Statistics (source here ), and utilize this for demonstrations of paragraph, spacing, and indentation in $\mathrm{\LaTeX}$. Consider the following: Output 1 Executing these, we will have Output 1. This is the simplest way we can do to separate multiple paragraphs in $\mathrm{\LaTeX}$. That is, by allotting single white space between them (paragraph), or that is two white spaces from the last line of the preceding paragraph. Output 2 To extend the distance between passages, say into double line spacing, just put \\ at every end of it and you will have Output 2. Hence from the above codes, the first paragraph will end with Ibrahim Al-Kadi. \\ , second with element in history. \\ , and so on. There is option for the magnitude of space, say 0.5 centimeter, or 0.2 inch spacing is achieve by \\ [0.5cm] and \\ [0.2in] , respectively. Now what happen when white spaces are omitted on the above codes, and leave \\ at the end of every paragraphs? ...

LaTeX: Introduction - First Document

Let us start with a simple $\mathrm{\LaTeX}$ document. Open your text editor (Texmaker, TeXnicCenter, TeXworks, etc.), then go to File>New, and paste the following: Save this and make sure the file has .tex extension. You should have something like this SampleTeX.tex in Texmaker In Texmaker: Press F1 to compile and view the output (Mac users should manually click the blue right arrow next to the paste button, because F1 won't work). The output is in PDF format with text on the top-left corner of the page that says the statement in Output 1. Now let us investigate these line by line. $\mathrm{\LaTeX}$ document always starts with \documentclass which sets the document you are to create. In this case the document class is article, {article} , with font size option set to 12 point, [12pt] . Output 1: SampleTeX.tex All $\mathrm{\LaTeX}$ tag always start with backslash ( \ ), use braces ( {} ) to enclose arguments, and brackets ( [] ) to enclose options of the ...

LaTeX: Download and Installation

Are you using MS Word for your paper works? And MS PowerPoint for your presentations? Why not try something that is FREE, powerful than those commercial products? Something that is quite challenging but FUN to use. Introducing $\mathrm{\LaTeX}$ , a document markup language similar to HTML but outputs in PDF format. I prefer $\mathrm{\LaTeX}$ because it produces beautiful mathematical equations that MS Word cannot. $\mathrm{\LaTeX}$ is used by publishers like O'Reilly and Springer for books that involve mathematics and statistics. Now let me guide you on getting started with $\mathrm{\LaTeX}$ on Windows, Mac and Ubuntu. For Windows users: Go to this site , download what is recommended for your system; follow the instructions in installation; after that, download the TeXMaker here , and install. (TeXMaker is a $\mathrm{\LaTeX}$ text-editor with many features including syntax highlighting) For Mac users: Go to this site , download the MacTeX.pkg; follow the instruc...