Posts

Showing posts from May, 2023

Bivariate normal distribution calculator

Image
  Bivariate normal distribution calculator 1. Using Real Statistics Excel Functions 2. Using JAVA applet by SOCR 3. Using Percentile (Ref. 3, 5) 4. Bivariate SND 5. Example of two dimensional plot (Ref 7,8) 1. Using Real Statistics Excel Functions Implemented 2 versions of BND cdf, by Donnelly and another by Genz. Donneally version is default (when don=True). For Standard BND, use BNORMSDIST for single given values, use BNORMSRECT b/w provided values. For BND with given mean, std.dev., use BNORDIST and BNORMRECT respectively. 2. Using JAVA applet by SOCR 3. Using Percentile (Ref. 3, 5), To be understood 4. Bivariate SND 5.  Example of two dimensional plot Using Python Code Reference. 1.  Multivariate Normal Functions | Real Statistics Using Excel (real-statistics.com) 2.  Bivariate Distribution Calculator (umich.edu)   3.  Bivariate normal distribution Calculator - High accuracy calculation (casio.com) 4.  Bivariate Normal Distribution – GeoGebra 5.  Bivariate Distribution Calculator (

Set theory and Probability theory Notations

Image
  Number Sets, Definition Natural Numbers  - Common counting numbers. Prime Number  - A natural number greater than 1 which has only 1 and itself as factors. Composite Number  - A natural number greater than 1 which has more factors than 1 and itself. Whole Numbers  - The set of Natural Numbers with the number 0 adjoined. Integers  - Whole Numbers with their opposites (negative numbers) adjoined. Rational Numbers  - All numbers which can be written as fractions. Irrational Numbers  - All numbers which cannot be written as fractions. Real Numbers  - The set of Rational Numbers with the set of Irrational Numbers adjoined. Complex Number  - A number which can be written in the form a + bi where a and b are real numbers and i is the square root of -1. In set theory, constants are often one-character symbols used to denote key  mathematical sets . The following table documents the most notable of these — along with their respective meaning and example. Reference 1. https://thirdspacelearnin

Squared distance measures; Chi-squared and Mahalanobis Distance

Image
 Chi-squared and Mahalanobis Distance (Squared standardized distance to mean) 1.       Using standardized distance to mean Ø   For univariate normal data, you determine whether an observation is likely to belong to a predefined population, according to how many standard deviations (eg. Z-score), it is away from the mean. Ø   An observation can be higher or lower than mean. So, standardized distance of an observation, from mean, can be positive or negative value. Ø   Likewise for a multinormal distribution, the distance from the mean or center of the measurements can be used to determine likelihood of membership of predefined population. Ø   For multivariate data, there is no specific positive or negative direction from center of the multivariate data. Need different metric. 2.       Using Squared standardized distance to mean Ø   For univariate data , you can calculate squared standardized distance to the mean, termed as Chi-square value for an observation . Ø   Chi-squa

Excercise on finding PDF, for Bivariate Guassian.

Image
Review of Formulas Thus, conditional distribution of Y given X=x is given as, Example 1 https://online.stat.psu.edu/stat414/lesson/21/21.1 Solution: Example 2. Source: https://www.sciencedirect.com/topics/mathematics/bivariate-normal-distribution Suppose that the heights of fathers and sons are r.v.'s  X  and  Y , respectively, having (approximately) Bivariate Normal distribution with parameters (expressed in inches)  μ 1  = 70,  σ 1  = 2,  μ 2  = 71,  σ 2  = 2 and  ρ  = 0.90. If for a given pair (father, son) it is observed that  X  =  x  = 69, determine: (i) The conditional distribution of the height of the son. (ii) The expected height of the son. (iii) The probability of the height of the son to be more than 72 in. Example 2. determine sigma1, sigma2, correlation coefficient that mu1=0 and mu=-1. exponent  of a bivariate normal density is,

Conditional Distribution, for BND. Example 1- Person's Weight and Height

Image
 Conditional Distribution, for BND Consider you have randomly selected persons from population and measured weight of the person. Let Y denotes random variable, weight of randomly selected persons in pounds and Y follows normal distribution. You are interested in determining the probability that a randomly selected individual weighs between 120 and 140 pounds. P(120< Y < 140). You could imagine that the weight of an individual increase (linearly ?) as height increases. Thus, you might find it more informative to take into account person's height in calculating the probability that a randomly selected individual weight is between 120 to 140 pounds, for example. Let X denotes random variable, height of the previous randomly selected persons in inches.          X follows normal distribution. Thus, P(120 < Y < 140 | X=x). conditional distribution, is more informative with inclusion of persons height. To calculate conditional probability, using formula below for BND, you wil

Standard Normal Distribution - Univariate, Bivariate and Multivariate context

Image
      STANDARD NORMAL DISTRIBUTION In Univariate Context PDF for Univariate Normal Distribution contains two parameters  μ  and  σ   and PDF is given by,  by plugin  μ = 0 and  σ = 1  in the PDF of the normal distribution, the equation simplifies to Units for the standard normal distribution curve are denoted by z and are called as z-score or z-values or standard score. CDF corresponds to AUC for defined interval, usually -infinity to z value and denoted by Greek letter. where e= 2.71828 and 3.14159. In Bivariate Context (Joint Bivariate Normal Density Function) PDF for bivariate normal distribution ( with two variables, say X1 and X2) will contain five parameters, two means  μ 1  and  μ 2 ,  two  standard deviations   σ 1  and  σ 2   and the product moment correlation between the two variables,  ρ PDF for Bivariate Normal Distribution is given by, where  ∑ is variance-covariance matrix. Comparison to Univariate PDF PDF function can be simplified presented using determinant of variance