Lecture 8 Merged
Lecture 8 Merged
Definition:
A matrix is a set or group of numbers arranged in a square or
rectangular array enclosed by two brackets
Matrices - Introduction
Properties:
•A specified number of rows and a specified number of
columns
•Two numbers (rows x columns) describe the dimensions
or size of the matrix.
Examples:
3x3 matrix
2x4 matrix
1x2 matrix
Matrices - Introduction
A matrix is denoted by a bold capital letter and the elements
within the matrix are denoted by lower case letters
e.g. matrix [A] with elements aij
Amxn=
n
m
A
i goes from 1 to m
j goes from 1 to n
Matrices - Introduction
TYPES OF MATRICES
3. Rectangular matrix
Contains more than one element and number of rows is not
equal to the number of columns
Matrices - Introduction
TYPES OF MATRICES
4. Square matrix
The number of rows is equal to the number of columns
(a square matrix A has an order of m)
mxm
5. Diagonal matrix
A square matrix where all the elements are zero except those on
the main diagonal
8. Triangular matrix
A square matrix whose elements above or below the main
diagonal are all zero
Matrices - Introduction
TYPES OF MATRICES
A square matrix whose elements above the main diagonal are all
zero
EQUALITY OF MATRICES
Two matrices are said to be equal only when all
corresponding elements are equal
Therefore their size or dimensions are equal as well
A= B= A=B
Matrices - Operations
Some properties of equality:
•IIf A = B, then B = A for all A and B
•IIf A = B, and B = C, then A = C for all A, B and C
A= B=
If A = B then
Matrices - Operations
ADDITION AND SUBTRACTION OF MATRICES
Associative Law:
A + (B + C) = (A + B) + C = A + B + C
A B C
2x3 2x3 2x3
Matrices - Operations
A+0=0+A=A
A + (-A) = 0 (where –A is the matrix composed of –aij as elements)
Matrices - Operations
SCALAR MULTIPLICATION OF MATRICES
Properties:
• k (A + B) = kA + kB
• (k + g)A = kA + gA
• k(AB) = (kA)B = A(k)B
• k(gA) = (kg)A
Matrices - Operations
MULTIPLICATION OF MATRICES
A x B = Not possible!
(6x2) (6x3)
Example
A x B = C
(2x3) (3x2) (2x2)
Matrices - Operations
Remember also:
IA = A
Matrices - Operations
Assuming that matrices A, B and C are conformable for
the operations indicated, the following are true:
1. AI = IA = A
2. A(BC) = (AB)C = ABC - (associative law)
3. A(B+C) = AB + AC - (first distributive law)
4. (A+B)C = AC + BC - (second distributive law)
Caution!
1. AB not generally equal to BA, BA may not be conformable
2. If AB = 0, neither A nor B necessarily = 0
3. If AB = AC, B not necessarily = C
Matrices - Operations
AB not generally equal to BA, BA may not be conformable
Matrices - Operations
If AB = 0, neither A nor B necessarily = 0
Matrices - Operations
TRANSPOSE OF A MATRIX
If :
2x3
2x3
3x2
Matrices - Operations
Properties of transposed matrices:
1. (A+B)T = AT + BT
2. (AB)T = BT AT
3. (kA)T = kAT
4. (AT)T = A
Matrices - Operations
1. (A+B)T = AT + BT
Matrices - Operations
(AB)T = BT AT
Matrices - Operations
SYMMETRIC MATRICES
A Square matrix is symmetric if it is equal to its
transpose:
A = AT
Matrices - Operations
Because:
Matrices - Operations
Properties of the inverse:
If
then
Matrices - Operations
If A = [A] is a single element (1x1), then the determinant is
defined as the value of the element
Then |A| =det A = a11
If A is (n x n), its determinant may be defined in terms of order
(n-1) or less.
Matrices - Operations
MINORS
If A is an n x n matrix and one row and one column are deleted,
the resulting matrix is an (n-1) x (n-1) submatrix of A.
The determinant of such a submatrix is called a minor of A and
is designated by mij , where i and j correspond to the deleted
row and column, respectively.
mij is the minor of the element aij in A.
Matrices - Operations
eg.
When the sum of a row number i and column j is even, cij = mij and
when i+j is odd, cij =-mij
Matrices - Operations
DETERMINANTS CONTINUED
Has cofactors :
And:
Example 2:
Matrices - Operations
ADJOINT MATRICES
Example:
If
The cofactor C of A is
Matrices - Operations
The adjoint matrix of A, denoted by adj A, is the transpose of its
cofactor matrix
Example:
Matrices - Operations
Matrices - Operations
USING THE ADJOINT MATRIX IN MATRIX INVERSION
Since
AA-1 = A-1 A = I
and
A(adj A) = (adjA) A = |A| I
then
Matrices - Operations
Example
A=
The determinant of A is
|A| = (3)(-1-0)-(-1)(-2-0)+(1)(4-1) = -2
so
and
Matrices - Operations
The result can be checked using
AA-1 = A-1 A = I
and
A-1 AX = A-1 B
Now since
A-1 A = I
We get
X = A-1 B
Therefore
Linear Equations
The values for the unknowns should be checked by substitution
back into the initial equations
Lecture-9 Biomedical
Modeling and Simulation
• There are two types of mechanical systems based on the type of
motion.
• Translational mechanical systems
• Rotational mechanical systems
resistor
inductor
capacitor
Impedance
Basic components
resistor
inductor
capacitor
Circuit Systems
+ +
Force Voltage Analogy
In force voltage analogy, the mathematical equations of translational
mechanical system are compared with mesh equations of the electrical
system.
• Consider the following translational mechanical system as shown in the
following figure.
Torque Voltage Analogy
In this analogy, the mathematical equations of rotational
mechanical system are compared with mesh equations of the
electrical system.
Force Current Analogy
In force current analogy, the mathematical equations of
the translational mechanical system are compared with the nodal
equations of the electrical system.
Lecture-10 Biomedical
Modeling and Simulation
Gaussian (Normal) Distribution
•The Gaussian Distribution is one of the
most used distributions in all of science.
It is also called the “bell curve” or the
Normal Distribution.
•The Gaussian
Distribution is
also called the
“Normal
Distribution”.
•The Gaussian
Distribution is
also called the
“Normal
Distribution”.
•Less well known
is that there is
also a
“Paranormal
Distribution!”
Normal or Gaussian Distribution
f (X )
X
μ
The Normal Distribution
μ=
σ2 =
l
Standard Deviation = σ
Normal Distribution
• Can take on an infinite
number of possible values.
• The probability of any one
of those values occurring
is essentially zero.
• Curve has area or
probability = 1
7-6
Given positive z
The probability found using a table is the
probability of having a standard normal variable
between 0 & the given positive z.
Areas Under the Standard Normal Curve
Areas and Probabilities
•The Table shows cumulative normal
probabilities. Some selected entries:
z F(z) z F(z) z F(z)
Between:
1.68.26%
0 . 3 2.95.44%
3.99.74%
0 . 2
f ( x
0 . 1
. 0
- 5
68% of
the data
NH = x1 + x2 + …. + xN
• NH is a random variable
Central Limit Theorem
• Coin flip problem.
• Probability function of NH
• P(Head) = 0.5 (fair coin)
N=5 N = 10 N = 40
Central Limit Theorem
The distribution of the sum of N random variables
becomes increasingly Gaussian as N grows.
Example: N uniform [0,1] random variables.
112.3 127.8 143.3
Normal Distribution
%
Probability / %
Normal Distribution
Why are normal distributions so
important?
• Many dependent variables are commonly
assumed to be normally distributed in the
population
• If a variable is approximately normally distributed
we can make inferences about values of that
variable
• Example: Sampling distribution of the mean
• So what?
• Remember the Binomial distribution
•With a few trials we were able to calculate
possible outcomes and the probabilities of
those outcomes
Normal Distribution
Why are normal distributions so important?
• Remember the Binomial distribution
• With a few trials we were able to calculate possible
outcomes and the probabilities of those outcomes
• Now try it for a continuous distribution with an infinite
number of possible outcomes. Yikes!
• The normal distribution and its properties are well
known, and if our variable of interest is normally
distributed, we can apply what we know about the
normal distribution to our situation, and find the
probabilities associated with particular outcomes.
•Since we know the shape of the normal
curve, we can calculate the area under the
curve
•The percentage of that area can be used to
determine the probability that a given value
could be pulled from a given distribution.
•The area under the curve tells us about the
probability- in other words we can obtain a
p-value for our result (data) by treating it as a
normally distributed data set.
Lecture-11 Biomedical
Modeling and Simulation
Meaning of Correlation Analysis
Correlation analysis is a process to find out the degree of relationship
between two or more variables by applying various statistical tools and
techniques.
According to Conner
“if two or more quantities vary in sympathy, so that movement in one
tend to be accompanied by corresponding movements in the other ,
then they said to be correlated.”
Correlation : On the basis of number of
variables
Partial correlation
When three or more variables are considered for
analysis but only two influencing variables are studied
and rest influencing variables are kept constant.
For example
Correlation analysis is done with demand, supply and
income. Where income is kept constant.
Correlation : On the basis of number of variables
Multiple correlation
In case of multiple correlation three or more variables are
studied simultaneously.
For example :
Rainfall, production of rice and price of rice are studied
simultaneously will be known are multiple correlation.
Correlation : On the basis of linearity
Linear correlation :
If the change in amount of one variable tends to
make changes in amount of other variable
bearing constant changing ratio it is said to be
linear correlation.
For example :
Income ( Rs.) : 350 360 370 380
Weight ( Kg.) : 30 40 50 60
Correlation : On the basis of
linearity
Non - Linear correlation :
If the change in amount of one variable tends to make
changes in amount of other variable but not bearing
constant changing ratio it is said to be non - linear
correlation.
For example :
Income ( Rs.) : 320 360 410 490
Weight ( Kg.) : 2133 49 56
Three Stages to solve correlation problem
2. Significance of correlation.
❑ If the value of r is more than six times the probable error, the
coefficient of correlation is practically certain i.e. the value of r is
significant.
Conditions under Probable error