Pages

Saturday, 30 May 2015

Basics of Matrices

Dear Student, you can find here the Matrix Theory and Exercises (basics) as per lecture planning.


A matrix that has $m$ rows and $n$ columns is called an $m \times n$ matrix (read: m by n). In the tag, "$m \times n$" the number of rows is always specified first, and the number of columns second. The tag $m \times n$ is called the order of the matrix.

 The typical element of matrix $A={{\left( \begin{matrix} {{a}_{11}} & \ldots & {{a}_{1n}} \\ \vdots & \ddots & \vdots \\ {{a}_{m1}} & \cdots & {{a}_{mn}} \\ \end{matrix} \right)}_{m\times n}}$ are denoted by \[{{a}_{ij}},\text{ }i=1,2,\ldots ,m\text{ and }j=1,2,\ldots ,n\text{ }\] The $i^{th}$ row of matrix $A$ is ${{A}_{i}}={{\left( {{a}_{i1}},{{a}_{i2}},\ldots ,{{a}_{in}} \right)}_{1\times n}}$, the $j^{th}$ column of matrix $A$ is ${{B}_{j}}={{\left( \begin{matrix} {{a}_{1j}} \\ {{a}_{2j}} \\ {{a}_{3j}} \\ \vdots \\ {{a}_{mj}} \\ \end{matrix} \right)}_{m\times 1}}$
Exercise:

Construct an $m \times n$ matrix whose elements ${{a}_{ij}}$are given by
  1.  $a_{ij}=1$,$i=1,2,\ldots ,m$  and  $j=1,2,\ldots ,n $ for $m = 2, n = 2$
  2. $a_{ij}=0$, if $i=j$, $a_{ij}=1$ if $i \ne j$, $i=1,2,\ldots ,m$  and  $j=1,2,\ldots ,n $ for $m = 3, n = 3$
  3. $a_{ij}=i+j$,  $i=1,2,\ldots ,m$  and  $j=1,2,\ldots ,n $ for $m = 3, n = 3$
  4. $a_{ij}=i \times j$,  $i=1,2,\ldots ,m$  and  $j=1,2,\ldots ,n $ for $m = 3, n = 3$
  5. $a_{ij}= $  minimum of  $i$ and $j$,  $i=1,2,\ldots ,m$  and  $j=1,2,\ldots ,n $ for $m = 3, n = 3$
  6. $a_{ij}=(i-j)^{2}$,  $i=1,2,\ldots ,m$  and  $j=1,2,\ldots ,n $ for $m = 2, n = 2$
  7. $a_{ij}=i^{2} \times j+ j^{2} \times i$,  $i=1,2,\ldots ,m$  and  $j=1,2,\ldots ,n $ for $m = 2, n = 2$
Equality of two matrices:
Definition: If $A$ is an $m \times n$ matrix with elements \[{{a}_{ij}},\text{ }i=1,2,\ldots ,m\text{ and }j=1,2,\ldots ,n\text{ }\] and $B$ is a $p \times q$ matrix with elements \[{{b}_{ij}},\text{ }i=1,2,\ldots ,p\text{ and }j=1,2,\ldots ,q\text{ }\]then we shall write $A = B$ if and only if
$m = p, n = q$ and ${{a}_{ij}}={{b}_{ij}},$\[i=1,2,\ldots ,m\text{ and }j=1,2,\ldots ,n\text{ }\]
The equality sign" = " when written between two matrices is essentially a new symbol, and one should note that it behaves in the same way as does the ordinary equality relating ordinary numbers. That is to say, matrix equality has these three properties:
1. It is reflexive. This means that for any matrix $A, A = A$.
2. It is symmetric. This means that if $A = B$, then $B = A$.
3. It is transitive. This means that if $A, B$ and $C$ are matrices, then $A = B$, and $B = C$ together imply that $A = C$.

Exercise
Which of the following statements are true? (1-3)
  1. $(0,0)=(0,0,0)$
  2. $(0-0,0)=(0-0,0-0)$
  3. $\begin{pmatrix}1 - 1 & 2 - 2\\ x -x & 1 - 1\end{pmatrix}=(0)$
  4. If $ \begin{pmatrix} x & 2x+y \\ x +z & 2y+ w \end{pmatrix} = \begin{pmatrix} 6 & 2\\ 4 & 3\end{pmatrix}$ find values of $x,y,z$ and $w$
The transpose of matrix:
If $A$ is an $m \times n$ matrix, the transpose of matrix $A$ denoted by $A^{\prime}$ is an $n \times m$ matrix.
If $A = (a_{ij})$, $i=1,2,\ldots ,m$  and  $j=1,2,\ldots ,n $ and $A^{\prime}=  (b_{kl})$, $k=1,2,\ldots ,n$  and  $l=1,2,\ldots ,m $  then $b_{kl} = a_{ji}$
If $A^{\prime} = A$ (i.e. $b_{ij}=a_{ij}$,  $i=1,2,\ldots ,n$  and  $j=1,2,\ldots ,n $) the matrix $A$ is called symmetric matrix.
If $A^{\prime} = -A$  (i.e. $m = n$ and  $b_{ij}=-a_{ij}$,  $i=1,2,\ldots ,n$  and  $j=1,2,\ldots ,n $) the matrix $A$ is called skew -symmetric matrix.

Exercise:

  1. If $A = \begin{pmatrix}2&1\\3&4\\5&6\end{pmatrix}$, construct $A^{\prime}$
  2. If $A = \begin{pmatrix}2&1&6&9&4\end{pmatrix}$, construct $A^{\prime}$
  3. If $A = \begin{pmatrix}1&2&x\\y&3&6\\4&z&0\end{pmatrix}$, construct $A^{\prime}$
  4. Which of following Matrices are symmetric?
    1. $A = \begin{pmatrix}1&2&3\\2&4&6\\3&6&5\end{pmatrix}$
    2. $B = \begin{pmatrix}-1&3&-1\\2&4&2\\-1&2&0\end{pmatrix}$
    3. $C = \begin{pmatrix}-1&6&3\\2&-1&4\\3&2&1\end{pmatrix}$
    4. $D = \begin{pmatrix}0&5&2\\5&6&4\\2&4&-7\end{pmatrix}$
  5. Which of following Matrices are skew -symmetric?
    1. $A = \begin{pmatrix}0&6&7\\-6&0&8\\-7&-8&0\end{pmatrix}$
    2. $B = \begin{pmatrix}0&1&-1\\1&0&2\\1&2&0\end{pmatrix}$
    3. $C = \begin{pmatrix}0&3&4\\-3&1&-7\\-4&7&2\end{pmatrix}$
    4. $D = \begin{pmatrix}0&5&1\\-5&0&2\\-1&-2&0\end{pmatrix}$
The ZERO Matrix:
This is a matrix whose elements are all zero. It is designated by O

$O = \begin{pmatrix}0&0&\ldots 0\\\vdots&\ddots&\vdots \\0&0&\ldots 0\end{pmatrix}$
That is $O = (a_{ij})$ then $a_{ij}=0$, $i=1,2\ldots m$, and $j=1,2,\ldots n$

The DIAGONAL Matrix:
These are square matrices in which the elements that are not on principal diagonal are all zero.  That is $A = (a_{ij})$, $a_{ij} = 0$, $i \ne j$, $i=1,2\ldots n$, and $j=1,2,\ldots n$. We can write $A = \text{diag} \begin{pmatrix} a_{11}&a_{22}&\ldots a_{nn}\end{pmatrix}$

The UNIT Matrix:
This is a square matrix with 1's on principal diagonal and 0's elewhere. It is  designated by I. We have

$I = \begin{pmatrix}1&0&\ldots 0\\0&1&\ldots 0\\ \vdots&\ddots&\vdots \\0&0&\ldots 1\end{pmatrix}$
That is $I = (a_{ij})$ then $a_{ij}=1$, if $i=j$, $a_{ij}=0$, if $i \ne j$, $i=1,2\ldots n$, and $j=1,2,\ldots n$


The TRIANGULAR Matrix:
An upper triangular matrix is a square matrix all of whose nonzero elements are located on or above the principal diagonal. A lower triangular matrix is a square matrix all of whose nonzero elements are located on or below the principal diagonal. In other words, an upper triangular matrix has all zeros below its main diagonal, where as a lower triangular matrix has all zeros above its main diagonal.
That is $A = (a_{ij})$,


$a_{ij}=0$, if  $i>j$,$i=1,2,\ldots, n$, $j=1,2,\ldots,n$, then matrix $A$ is upper triangular

$a_{ij}=0$, if $i  < j$, $i=1,2,\ldots, n$, $j=1,2,\ldots,n$, then matrix $A$ is lower triangular

ADDITION OF TWO MATRICES
Definition: Two $m \times n$ matrices $A=(a_{ij})$ and $B=(b_{ij})$, $i=1,2,\ldots, m$, $j=1,2,\ldots, n$ are added by adding corresponding elements. The expressions $A+B$ will designate the $m \times n$ matrix whose elements are $a_{ij}+b_{ij}$. Once again
$(a_{ij}+b_{ij})=(a_{ij})+b_{ij})$

Theorem:

  1. Matrix addition is commutative. That is for any two matrices $A$ and $B$ conformable  for addition $A+B=B+A$
  2. Matrix addition is associative. That is for any three matrices $A,B$ and $C$  that are conformable for addition,$(A+B)+C=A+(B+C)$
  3. If $A$ is an $m \times n$ matrix, and $O$ is the $m \times n$ zero matrix,then $A+O=O+A$
SUBTRACTION OF TWO MATRICES
If $A=(a_{ij})$ is an $m \times n$ matrix, then its negative, designated by $-A$, is the $m \times n$ matrix whose elements are $-a_{ij}$. By the difference $A - B$, we shall mean the matrix $A+(-B)$, that is  to say, $A=(a_{ij})$ and $B=(b_{ij})$, $i=1,2,\ldots, m$, $j=1,2,\ldots, n$ then
$A-B=(a_{ij}-b_{ij})$, $i=1,2,\ldots, m$, $j=1,2,\ldots, n$

Theorem: For any matrix $A$

  1. $-O=O$
  2. $A-A=A+(-A)$
  3. $-(-A)=A$
SCALAR MULTIPLICATION
Definition:

If $A=(a_{ij})$ is an $m \times n$ matrix $i=1,2,\ldots, m$, $j=1,2,\ldots, n$, then $cA$ will designate a scalar product of $A$ by $c$. It is $m \times n$ matrix $i=1,2,\ldots, m$, $j=1,2,\ldots, n$, whose elements are $c \times a_{ij}$. In other words, $cA = (c \times a_{ij})$


Theorem: Let $A$ and $B$ be two $m \times n$ matrices, and let $a$ and $b$ are ordinary numbers (scalar) Then,
  1. $a(bA)=(ab)A$
  2. $(a+b)A=aA+bB$
  3. $a(A+B)= aA+aB$
  4. $(1)A=A$
  5. $(-1)A=-A$
  6. $aO=O$
  7. $OA=O$
Exercise:

  1. If $A=\begin{pmatrix}1 & 2 \\ 3 & -4 \end{pmatrix}$, $B=\begin{pmatrix}2 & -7\\5 & 8 \end{pmatrix}$ and $C=\begin{pmatrix}1 & 5\\0 & 2\end{pmatrix}$ Find $A + B - C$
  2. If $A=\begin{pmatrix}2 & 3 \\ -1 & 4\\1 & 0 \end{pmatrix}$, $B=\begin{pmatrix}-1 & 2\\3 & 1\\5&4 \end{pmatrix}$ and $C=\begin{pmatrix}2 & -1\\2 & 3\\-4&1\end{pmatrix}$ Find  $A$$ -B +2C$
MATRIX MULTIPLICATION
Definition: Let $A$ and $B$ be $1 \times n$ or $n \times 1$ matrices. $A$ has elements $a_{1},a_{2},\ldots, n$ and B has elements $b_{1},b_{2},\ldots, n$ The inner product of A and B is given by the formula $A \cdot B=a_{1}b_{1}+a_{2}b_{2}+\cdots +a_{n}b_{n}$

Exercise:
 If $A = (1, 1, 1)$, $B = (3, 1, 4)$, $C = (0, 1, 2)$, compute the quantities $A \cdot A$, $A \cdot B$, $A \cdot C$, $(A - B) \cdot (A + B)$, $(2A) \cdot (3B)$, $A\cdot (B + C)$,
$(A + B) \cdot C$, $(A - B) \cdot (C - B)$, $(A + 2B + C) \cdot (A + B + 2C)$.

Two matrices are conformable for multiplication when the number of columns of the first factor equals the number of rows of the second factor. The orders of two matrices $A$ and $B$ that are conformable for multiplication can be written as $ m \times n$ and $n \times p$ respectively.


Designate the $m$ rows of $A$ by $A_{1},A_{2},\ldots ,A_{m}$  (Consider them as row vectors.) Designate the $p$ columns of $B$ by $B_{1},B_{2},\ldots,B_{p}$ (Consider them as column vectors.) These vectors all have $n$ elements (because the number of columns of $A$ is $n$ and the number of rows of $B$ is also $n$). For each integer $i$ between $1$ and $m$, inclusive, and for each integer $j$ between $1$ and $p$, inclusive, the inner product $A_{i} \cdot B_{j}$ can therefore be formed. This number will be the element $c_{ij}$in the  $(i,j)^{th}$ position of the product $C = AB$.

Definition: If $A$ is an $m \times n$ matrix with rows $A_{1},A_{2},\ldots ,A_{m}$ and $B$ is an $n \times p$ matrix with columns $B_{1},B_{2},\ldots,B_{p}$, then the product $AB$ is an $m \times p$  matrix $C$ whose elements $c_{ij}$ are given by the formula $c_{ij}=A_{i} \cdot B_{j}$

We may also write $C = AB =$  $\begin{pmatrix}A_{1}\cdot B_{1} &A_{1}\cdot B_{2}& \ldots A_{1}\cdot B_{p}\\ A_{2}\cdot B_{1} &A_{2}\cdot B_{2} & \ldots A_{2}\cdot B_{p}\\ \vdots &\vdots & \vdots\\ A_{m}\cdot B_{1} &A_{m}\cdot B_{2}& \ldots A_{m}\cdot B_{p} \end{pmatrix}$

Exercise:
  1. Find elements $c_{22},c_{32},c_{23},c_{33}$ in the product $C=AB$ where, $A = \begin{pmatrix} 2 & 3 & 4\\1 & 2 & 3\\-1&1&2\end{pmatrix}$, $B=\begin{pmatrix} 1&3 &0\\-1 & 2 & 1\\0 & 0 & 2\end{pmatrix}$
  2. Given $A = \begin{pmatrix} 1 & 1 & -1\\2 & -3 & 4\\3&-2&3\end{pmatrix}$, $B=\begin{pmatrix} -1&-2 &-1\\6 & 12 & 6\\5 & 10 & 4\end{pmatrix}$, $C = \begin{pmatrix}-1 & -1 & 1\\2 & 2 &-2\\-3&-3&3 \end{pmatrix}$ Find 
    1. $AB$
    2. $BA$
    3. $AC$
    4. $CA$
  3. For the following pair of matrices compute $AB$ and $BA$ whichever exist.
    1. $A=\begin{pmatrix}1&2&3&4&5\\6&7&8&0&3\\6&-3&4&-2&1 \end{pmatrix}$, $B = \begin{pmatrix} 1 & 2\\3 & 4\\5 & 6\\6 & 5\\7 & 0\end{pmatrix}$
    2. $A=\begin{pmatrix} 2&3&4&5\end{pmatrix}$, $B=\begin{pmatrix} 1&2&3&4\end{pmatrix}$
    3. $A=\begin{pmatrix} 0&1&2\\1 &2&0\end{pmatrix}$,$B=\begin{pmatrix} 0&1\\-1 & 0\\0 & 1\end{pmatrix}$
    4. $A= \begin{pmatrix}1 & 2\\2 & 3\\3 & 4 \end{pmatrix}$, $B = \begin{pmatrix} 3 & -2 & 1\\0 & 1 & -2\\3& -4 & 5\end{pmatrix}$
    5. $A=\text{diag}\begin{pmatrix}\lambda_{1}&\lambda_{2}&\lambda_{3}&\lambda_{4} \end{pmatrix}$ $B =\text{diag}\begin{pmatrix}\mu_{1}&\mu_{2}&\mu_{3}&\mu_{4} \end{pmatrix}$
  4. Multiply 
    1. $\begin{pmatrix} 1 & 6 & 1\\0& 1 & 2\\ 0& 0 & 1\end{pmatrix}$$\begin{pmatrix} x\\y\\z\end{pmatrix}$
    2. $\begin{pmatrix} 1 & 0 & 0\\0& 4 & 0\\ 0& 0 & 5\end{pmatrix}$$\begin{pmatrix} x\\y\\z\end{pmatrix}$
    3. $\begin{pmatrix}1 & 4 & 3 & 2 \end{pmatrix}$ $\begin{pmatrix} x\\y\\z\\w\end{pmatrix}$
There are two types of matrix multiplication: in the product $AB$, $B$ is said to be premulliplied by $A$ or to be multiplied by $A$ on the left, while in the product $BA$, $B$ is said to be postmultiplied by $A$ or to be multiplied by $A$ on the right. Two matrices $A$ and $B$ for which $AB = BA$ are said to commute with one another.

Exercise:
  1. Do the matrices $\begin{pmatrix} 1&2&1\\2&1&1\\2&-1&1\end{pmatrix}$ and $\begin{pmatrix}1&1&1\\1&-1&1\\-1&1&1 \end{pmatrix}$ commute?
  2. If the matrix $\begin{pmatrix} 1&2\\3&0\end{pmatrix}$ commutes with matrix $\begin{pmatrix} a&b\\c&d\end{pmatrix}$  what must be the relationship among the quantities $a$, $b$, $c$ and $d$?

TheoremIf $A$, $B$, and $C$, are matrices; if $I$ is the unit matrix and $O$ is the zero matrix, then, with proper attention paid to conformability, we have,
  1. $(AB)C = A(BC)$ the associative law;
  2. $(A + B)C = AC + BC$ the distributive laws;
  3. $A(B + C) = AB + AC$ the distributive laws;
  4. $OA = AO = O$ multiplication by zero;
  5. $AI = IA = A$ multiplication by the unit.


Corollary: If a and b are scalars and if $A$ and $B$ are conformable for matrix multiplication, then $(aA)(bB)=ab(AB)$
Exercise: Verify the two distributive laws numerically with selection 
  1. $A = \begin{pmatrix}1&2\\3 & 4 \end{pmatrix}$, $B = \begin{pmatrix}1&0\\2 & 3 \end{pmatrix}$ and $C = \begin{pmatrix}1&-1\\0 & 1 \end{pmatrix}$
  2. $A = \begin{pmatrix}1&-1\\2 & 0 \end{pmatrix}$, $B = \begin{pmatrix}0&4\\1 & 2 \end{pmatrix}$ and $C = \begin{pmatrix}1&1\\1& 1 \end{pmatrix}$
Theorem: If $A$ and $B$ are conformable for multiplication, then $(AB)^{\prime}=(B^{\prime}A^{\prime})$
Corollary: For matrices $A,B,C,D$  we can write $(ABCD)^{\prime}=(D^{\prime}C^{\prime}B^{\prime}A^{\prime})$. In words: the transpose of the product of any number of matrices is equal to the product of the transposes of the individual matrices formed in the reverse order.

Exercise: If $A = \begin{pmatrix} 1&1&1\\-1&1&-1\\1&1&-1\end{pmatrix}$ and $B = \begin{pmatrix} 1&-1&1\\1&1&1\\-1&-1&1\end{pmatrix}$ show by direct computation that
 $(AB)^{\prime}=(B^{\prime}A^{\prime})$

Tuesday, 26 May 2015

Internal Exam

Dear student you can access now the  Question paper from this link

Dear Student due to Internet connectivity, I could not post Answer Keys.

Now you can find Answer Keys Here
 

Sunday, 10 May 2015

(Biostatistics) Hypothesis Test: Theory

Dear Student, as we have discussed in theory lecture, you can find here basics of theory of Test of Statistical Hypothesis. The reference for the content is "Exploring Statistics" by D Raghavrao

Statistical Hypothesis:
We may define statistical hypothesis as an assumption regarding the parameter of the population distribution under study.Statisticians to establish claims use their complements as null hypotheses and try to find out evidence in sample data to reject the formulated null hypothesis.
For  example we adopt the null hypothesis that the analytical method is not subject to systematic error. The term null is used to imply that there is no difference between the observed and known values other than that which can be attributed to random variation.

Assuming that this null hypothesis is true, statistical theory can be used to calculate the probability that the observed difference (or a greater one) between the sample mean,$\bar{x}$ and the true value, $\mu$, arises purely as a result of random errors. The lower the probability that the observed difference occurs by chance, the less likely it is that the null hypothesis is true. Usually the null hypothesis is rejected if the probability of such a difference occurring by chance is less than 1 in 20 (i.e. 0.05 or 5$\%$). In such a case the difference is said to be significant at the 0.05 (or 5$\%$) level.

Types of Hypothesis
In general, when testing the mean,$\mu$, the three cases of formulating $H_{0}$ are 

  1. $H_{0}:\mu \geq \mu_{0}, H_{1}:\mu < \mu_{0}$
  2. $H_{0}:\mu \leq \mu_{0}, H_{1}:\mu > \mu_{0}$
  3. $H_{0}:\mu = \mu_{0}, H_{1}:\mu \neq \mu_{0}$

Depending on the specific objectives and goals of a study one and only one of the three types of formulations of $H_{0}$  will be selected and the conclusions will be drawn accordingly. 

After formulating the null and alternative hypotheses, one computes the test statistic, which measures the difference between the data and what is expected based on the null hypothesis. The test statistic is a random variable, while the computed quantity is a numerical value assumed by the random variable. In problems related to testing population means, the standard normal variable, $Z$, or the $T$- variable usually are the test statistics.

We assume the null hypothesis is true, and usually (but not always) wish to show that the alternative is actually true. After collecting sample data, we compute a test statistic which is used as evidence for or against the null hypothesis (which we assume is true when calculating the test statistic). The set of values of the test statistic that we believe provide sufficient evidence to reject the null hypothesis in favor of the alternative is called the rejection region. The probability that we could have obtained as strong or stronger evidence against the null hypothesis (when it is true) than what we observed from our sample data is called the observed significance level or $p$-value.

Types of Error in Statistical Hypothesis Testing

When testing a particular hypothesis we may commit an error in making the decision. We refer to the hypothesis being tested as hypothesis H, then

State of $H$

Do not Reject $H$Reject $H$
$H$ is trueCorrect DecisionType I Error
$H$ is FalseType II ErrorCorrect Decision



If the hypothesis H is true and not rejected or false and rejected, the decision is in either case correct. If hypothesis H is true but rejected, it is rejected in error, and if hypothesis H is false but not rejected, this is an error. The first of these errors is called Type I error and the probability of committing it is designated by the Greek letter $\alpha$ (alpha); the second is called a Type II error and the probability of committing it is designated by the Greek letter $\beta$  (beta). The probability of committing a Type I error is called the level of significance.

If an $H_{0}$ is rejected in favor of $H_{1}$ at a   level of significance, it is understood that if similar data are collected and analyzed several times, 100$\alpha \%$ times $H_{0}$ will be rejected when it is true.

In a problem, when a type I error is serious and one rarely wishes to commit such an error, $\alpha$   will be taken as small. By having $\alpha$   small, fewer rejections of $H_{0}$ will be achieved in the decisions. Usually $\alpha$  will be taken as 0.05 or 0.01. If an $H_{0}$ is rejected using $\alpha$  = 0.05, the test statistic is said to be significant. If an $H_{0}$ is rejected using $\alpha$ = 0.01, the test statistic is said to be highly significant. The test statistic is not significant, if $H_{0}$ is not rejected at the 0.05 level.

Procedure for testing Hypothesis


  1. $H_{1}$: The alternative hypothesis is the claim we wish to establish.
  2. $H_{0}$: The null hypothesis is the negation of the claim.


The two types of error and their probabilities are

  1. Type I error: Rejection of $H_{0}$ and $H_{0}$ is true.
  2. Type II error: Non - rejection of $H_{0}$ when $H_{1}$ is true.
  3. $\alpha$  = probability of making a Type I error (also called the level of significance)
  4. $\beta$  = probability of making a type II error
  1. We formulate a null hypothesis and an appropriate alternative hypothesis which we accept when the null hypothesis must be rejected.
  2. We specify the probability of a Type I error; of possible, desired or necessary, we may also specify the probability of Type II error for particular alternatives.
  3. Based on the sampling distribution of an appropriate statistic, we construct a criterion for testing null hypothesis against the given alternative.
  4. We calculate from the data the value of the statistic on which the decision is to be based.
  5. We decide whether to reject the null hypothesis or whether to fail to reject it.


Saturday, 9 May 2015

Bio statistics Exercises and Solutions

Dear Students in this section, you can find solutions to few problems discussed in theory class

Statistical Table: Standard Normal Distribution $P(Z \leq z)$
z0.000.010.020.030.040.050.060.070.080.09
0.00.50000.50400.50800.51200.51600.51990.52390.52790.53190.5359
0.10.53980.54380.54780.55170.55570.55960.56360.56750.57140.5753
0.20.57930.58320.58710.59100.59480.59870.60260.60640.61030.6141
0.30.61790.62170.62550.62930.63310.63680.64060.64430.64800.6517
0.40.65540.65910.66280.66640.67000.67360.67720.68080.68440.6879
0.50.69150.69500.69850.70190.70540.70880.71230.71570.71900.7224
0.60.72570.72910.73240.73570.73890.74220.74540.74860.75170.7549
0.70.75800.76110.76420.76730.77040.77340.77640.77940.78230.7852
0.80.78810.79100.79390.79670.79950.80230.80510.80780.81060.8133
0.90.81590.81860.82120.82380.82640.82890.83150.83400.83650.8389
1.00.84130.84380.84610.84850.85080.85310.85540.85770.85990.8621
1.10.86430.86650.86860.87080.87290.87490.87700.87900.88100.8830
1.20.88490.88690.88880.89070.89250.89440.89620.89800.89970.9015
1.30.90320.90490.90660.90820.90990.91150.91310.91470.91620.9177
1.40.91920.92070.92220.92360.92510.92650.92790.92920.93060.9319
1.50.93320.93450.93570.93700.93820.93940.94060.94180.94290.9441
1.60.94520.94630.94740.94840.94950.95050.95150.95250.95350.9545
1.70.95540.95640.95730.95820.95910.95990.96080.96160.96250.9633
1.80.96410.96490.96560.96640.96710.96780.96860.96930.96990.9706
1.90.97130.97190.97260.97320.97380.97440.97500.97560.97610.9767
2.00.97720.97780.97830.97880.97930.97980.98030.98080.98120.9817
2.10.98210.98260.98300.98340.98380.98420.98460.98500.98540.9857
2.20.98610.98640.98680.98710.98750.98780.98810.98840.98870.9890
2.30.98930.98960.98980.99010.99040.99060.99090.99110.99130.9916
2.40.99180.99200.99220.99250.99270.99290.99310.99320.99340.9936
2.50.99380.99400.99410.99430.99450.99460.99480.99490.99510.9952
2.60.99530.99550.99560.99570.99590.99600.99610.99620.99630.9964
2.70.99650.99660.99670.99680.99690.99700.99710.99720.99730.9974
2.80.99740.99750.99760.99770.99770.99780.99790.99790.99800.9981
2.90.99810.99820.99820.99830.99840.99840.99850.99850.99860.9986
3.00.99870.99870.99870.99880.99880.99890.99890.99890.99900.9990
3.10.99900.99910.99910.99910.99920.99920.99920.99920.99930.9993
3.20.99930.99930.99940.99940.99940.99940.99940.99950.99950.9995
3.30.99950.99950.99950.99960.99960.99960.99960.99960.99960.9997
3.40.99970.99970.99970.99970.99970.99970.99970.99970.99970.9998
3.50.99980.99980.99980.99980.99980.99980.99980.99980.99980.9998
3.60.99980.99980.99990.99990.99990.99990.99990.99990.99990.9999
3.70.99990.99990.99990.99990.99990.99990.99990.99990.99990.9999
3.80.99990.99990.99990.99990.99990.99990.99990.99990.99990.9999

Example 1:
The display below shows some information for each of 12 tablets taken from a batch of a drug product, and for each of 10 human subjects administered tablets from the same batch.  The "in vitro" figures are the percentages of drug dissolved half an hour after the tablet was introduced into a dissolution medium.
   
5.94 6.22 5.09 6.22 5.37
5.51 4.1 5.51 4.52 4.52
     
Compute arithmetic mean and standard deviation of vitro figures.
Ans:  Let $x$ be the variable takes values on measurement of percentage of drug dissolved half an    hour after the tablet was introduced. The mean of $x$ is $\bar{x}=\dfrac{\sum\limits_{i=1}^{10}{x_{i}}}{10}=\dfrac{53}{10}=5.3 \%$
The standard deviation of $x$ is
 $S_{x}=\sqrt{\dfrac{\sum\limits_{i=1}^{10}{{x_{i}}^2}-\dfrac{({\sum\limits_{i=1}^{10}{x_{i}}})^2}{10}}{9}}$

$ =\sqrt{\dfrac{285.7964 - \dfrac{53^{2}}{10}}{9}}$

$= \sqrt{\dfrac{285.7964-280.9}{9}}$

$ = \sqrt{0.544044444}=0.737593685 \%$

OR

$x_{i}$   $x_{i}-\bar{x}$  $(x_{i}- \bar{x})^{2}$

5.94
0.64
0.4096
6.22
0.92
0.8464
5.09
-0.21
0.0441
6.22
0.92
0.8464
5.37
0.07
0.0049
5.51
0.21
0.0441
4.1
-1.2
1.4400
5.51
0.21
0.0441
4.52
-0.78
0.6084
4.52
-0.78
0.6084

Total
0
4.8964
Therefore
$S_{x}= \sqrt{\dfrac{\sum\limits_{i=1}^{10}{(x_{i}-\overline{x})}^2}{9}}$ =$\sqrt{\dfrac{4.8964}{9}}$ =$\sqrt{0.544044444}=0.737593685\% $

Example 2
In a series of experiments on the determination of tin in foodstuffs, samples were boiled with hydrochloric acid under reflux for different times. Some of the results are shown below:
30 55 57 59 56
Compute $1^{st}$ and $3^{rd}$ quartiles of tin value.
Let $x$ be the variable takes values on measurement of tin $mg kg^{-1}$ for reflux time 30 min.
Arranging the observations in ascending order we obtain

$X_{(1)}=55,X_{(2)}=56,X_{(3)}=56,X_{(4)}=57,X_{(5)}=59,X_{(6)}=59$
Position for First Quartile = $\dfrac{6+1}{4}=1.75$

Quartile 1 = $X_{(1)}+0.75\times (X_{(2)}-X_{(1)}) = 55+0.75\times(56-55)=55.75 mg kg^{-1}$
Position for Third Quartile = $\dfrac{3\times(6+1)}{4}=5.25$

Quartile 3 = $X_{(5)}+0.25\times (X_{(6)}-X_{(5)}) = 59+0.25\times(59-59)=59 mg kg^{-1}$

Example 3
Suppose a random variable X has Normal distribution with mean $\mu = 3$ and standard deviation $\sigma = 2$, compute the following probabilities

  1. $P(X < 4)$
  2. $P(X > 2)$
  3. $P(1 < X < 4)$
Ans:
To Compute $P(X < 4)$
Consider the transformation $z = \dfrac{x-\mu}{\sigma}$. Replacing $x$ by 4 in $z$ we can write
$P(X < 4)=P\left(Z < \dfrac{4-3}{2}\right)$

$=P(Z < 0.5)$
This problem is represented graphically as

Fig 1. Area representing $P(Z < 0.5)$
The area can be read from Statistical Table
we can write
$P(X < 4) = P(Z < 0.5) = 0.6915$










To Compute $P(X > 2)$
Consider the transformation $z = \dfrac{x-\mu}{\sigma}$. Replacing $x$ by 2 in $z$ we can write
$P(X > 2)=P\left(Z > \dfrac{2-3}{2}\right)$

$=P(Z > -0.5)$
This problem is represented graphically as
Fig 2. Area representing $P(Z > -0.5)$

This is not the same Area represented by Statistical Table
Due to symmetric nature of graph we can represent mirror image of the Area as (Fig 3.) This is the same Area represented by Statistical Table. We write

$P(X >2) = P(Z > -0.5) = P(Z  < 0.5) = 0.6915$




Fig 3.Showing Mirror Area representing $P(Z < 0.5)$












To Compute $P(1 < X < 4)$
Consider the transformation $z = \dfrac{x-\mu}{\sigma}$. Replacing $x$ by 1 , 4 in $z$ we can write

$P(1 < X < 4) = P\left( \dfrac{1-3}{2} < Z < \dfrac{4-3}{2} \right)$

$=P(-1 < Z < 0.5)$
This problem is represented graphically as
Fig 4. Area representing $P(-1 < Z < 0.5)$
This is not the same Area represented by Statistical Table







This Area can be divided in to different areas as follows
Fig 5. Area $P(Z  < 0.5)$
Fig 6. Area $P(Z \leq  -1)$

That is we write $P(-1 < Z < 0.5)=P(Z < 0.5) - P( Z \leq -1)$
Using Symmetric property of graph we represent mirror image of graph $P( Z \leq -1)$ as (Fig 7)

Fig 7. Area $P(Z \geq 1)$








Because the total area below the curve is 1, this gives computation of $P(Z \geq 1)$ by following area
Fig 8. $P(Z < 1)$

We can write $P(Z \geq 1)=1 - P(Z < 1)$ (Fig 8)






Therefore
$P(Z \leq -1) = P(Z \geq 1) $

$=1 - P(Z < 1) $

$= 1 - 0.8413 $

$= 0.1587 $

and hence

$P(-1 < Z < 0.5) = P(Z < 0.5)-P( Z \leq -1) $

$=0.6915 - 0.1587 $

$=0.5328 $

We get  $P(1 < X < 4)=0.5328$

Example 4
It is suspected that an acid–base titrimetric method has a significant indicator error and thus tends to give results with a positive systematic error (i.e. positive bias). To test this an exactly 0.1 M solution of acid is used to titrate 25.00 ml of an exactly 0.1 M solution of alkali, with the following results (ml)
Volume of Acid: 25.06 25.18 24.87 25.51 25.34 25.41

  1. Determine Mean and Standard deviation of the result obtained.
  2. Test Hypothesis of no bias  $H_{0}:\mu = 25ml$ against there is bias  $H_{1}:\mu > 25 ml$ for this experiment at 5$\%$ level of significance.You are given $t_{5,0.05}=2.015,t_{5,0.025}=2.571$

Ans


Let $x$ denotes volume (ml) of test result and $n$ number  of test results.Therefore $x_{1}=25.06,x_{2}=25.18,x_{3}=24.87,x_{4}=25.51,x_{5}=25.34,x_{6}=25.41$ , Therefore
$\bar{x} = \dfrac{\sum\limits_{i=1}^{6}x_{i}}{6}$

$=\dfrac{151.37}{6}$

$=25.22833$

$s^{2} = \dfrac{\sum\limits_{i=1}^{6}x_{i}^{2}-\dfrac{\left( \sum\limits_{i=1}^{6}x_{i}\right)}{6}}{5}$

$=\dfrac{3819.0967-3818.8130}{5}$

$=0.05677 $

$s = \sqrt{0.05677}$

$=0.2383$

Using computations of sample mean and sample standard deviation, the computation of test statistic to test $H_{0}$ is

$t  = \dfrac{\bar{x}-\mu}{s/\sqrt{n}}$

$=\dfrac{25.22833-25}{0.2383/\sqrt{6}}$

$=2.347$

As Computed test statistic $t = 2.347$ exceeds $t_{5,0.05}=2.015$,we reject hypothesis $H_{0}$ in favor  of $H_{1}$ at 5$\%$ level of significance.

Example 5
Two types of chemical solution A and B were tested for their pH (degree of acidity of the solution). Analysis of 6 samples of A showed a mean pH of 7.52 with a standard deviation of 0.024. Analysis of 5 samples of B showed a mean pH of 7.49 with a standard deviation of 0.032. Using a 5$\%$ significance level, Test the hypothesis $H_0:\mu_1 = \mu_2$ against $H_1: \mu_1 \neq \mu_2$. Where $\mu_1$ and $\mu_2$ are true mean pH values of two solutions A and B. You are given 
$t_{9,0.05}=1.833,t_{9,0.025}=2.262$

Ans:
Let $X$ denotes measurement of pH of chemical solution  obtained by Analyst A and $Y$ denotes measurement of pH of chemical solution  obtained by Analyst B.

Also $m  = 6$  and $n = 5$ number of samples used by Analysts A and B respectively. We are given
Analyst A:
Sample Mean $\bar{X} = 7.52$
Sample Standard deviation $S_{1} = 0.024$
Analyst B
Sample Mean $\bar{Y} = 7.49$
Sample Standard deviation $S_{2} = 0.032$

To test the Hypothesis 
$H_0:\mu_1 = \mu_2$ against $H_1: \mu_1 \neq \mu_2$ 
We assume
  1. The sample of observations on $X$ and sample of observations on $Y$ are varying according to Normal distribution with means $\mu_1$ , $\mu_2$  and variances $\sigma_{1}^{2}$ ,$\sigma_{2}^{2}$ respectively.
  2. Here $\sigma_{1}^{2}$ ,$\sigma_{2}^{2}$ are unknown and $\sigma_{1} = \sigma_{2}$ 
Then
$S_{p}^{2} = \dfrac{(m-1)S_{1}^{2}+(n-1)S_{2}^{2}}{m+n-2}$

$ = \dfrac{(5)0.024^{2}+(4)0.032^{2}}{6+5-2}$

$=\dfrac{0.006976}{9}$

$=0.000775$

$S_{p} = \sqrt{0.000775} =0.027841 $

$S_{p}\sqrt{\dfrac{1}{m}+\dfrac{1}{n}} = 0.027841 \times \sqrt{\dfrac{1}{6}+\dfrac{1}{5}} $

$ =0.027841 \times \sqrt{0.366667}$

$  = 0.016858$

We use $t_{9,0.025}=2.262$,

Therefore $t_{9,0.025} \times 0.016858 =0.038134 $

Criteria For Rejection of $H_0$:
Reject $H_{0}$ if $|\bar{X}-\bar{Y}| > 0.038134$

Here $|\bar{X}-\bar{Y}| = | 7.52 - 7.49| = 0.03$

As $|\bar{X}-\bar{Y}|  \ngtr 0.038134$  Do not Reject $H_{0}$ at 5$\%$ level of significance.


Wednesday, 6 May 2015

Students

Answer Keys for BT808 Internal Examination Part A Objectives


Answer Keys
1 - C 6 - C
2 - B 7 - B
3- D 8 - D
4-C 9 - A
5- D 10 - A



Reply for suggestions and changes
Thanks