1 / 36

Biostatistics-Lecture 2

Biostatistics-Lecture 2. Ruibin Xi Peking University School of Mathematical Sciences. Data Exploration—categorical variable (1). Single Nucleotide Polymorphism. Data Exploration—categorical variable (2). Zhao and Boerwinkle (2002) studied the pattern of SNPs

sunee
Download Presentation

Biostatistics-Lecture 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Biostatistics-Lecture 2 Ruibin Xi Peking University School of Mathematical Sciences

  2. Data Exploration—categorical variable (1) • Single Nucleotide Polymorphism

  3. Data Exploration—categorical variable (2) • Zhao and Boerwinkle (2002) studied the pattern of SNPs • Collected all available SNPs in NCBI through 2001 • Look at the distribution of the different SNPs • Why much more transitions? Bar Graph

  4. Data Exploration—categorical variable (2) • Zhao and Boerwinkle (2002) studied the pattern of SNPs • Collected all available SNPs of human genome in NCBI through 2001 • Look at the distribution of the different SNPs • Why much more transitions? Pie Graph

  5. Data exploration—quantitative variable (1) • Fisher’s Iris data • E. S. Anderson measured flowers of Iris • Variables • Sepal (萼片) length • Sepal width • Petal (花瓣) length • Petal width Iris

  6. Data exploration—quantitative variable (2) • Histogram (直方图) Unimode distribution bimode distribution What is the possible reason for the two peaks?

  7. Data exploration—quantitative variable (2) • Scatter plot (散点图) Cluster 2 Cluster 1

  8. Data exploration—quantitative (3) variable (2) • In fact, there are three species of iris • Setosa, versicolor and virginica

  9. Summary statistics • Sample mean • Sample median • Sample variance • Sample standard deviation

  10. Quantiles • Median: the smallest value that greater than or equal to at least half of the values • qthquantile: the smallest value that greater than or equal to at least 100q% of the values • 1stquantile Q1: the 25% quantile • 3rdquantile Q3: the 75% quantile • Interquantile range (IQR): Q3-Q1

  11. Boxplot IQR 1.5IQR

  12. Data exploration—quantitative (4) • Boxplot

  13. Relationships between categorical variable (1) • A study randomly assigned 11034 physicians to case (11037) or control (11034) group. • In the control group • 189 (p1=1.71%) had heart attack • In the case group • 104 (p2=0.94%) had heart attach

  14. Relationships between categorical variables (2) • Relative risk • Odds ratio • Sample Odds • Odds ratio

  15. Relationships between categorical variable (3) • Contingency table • Does taking aspirin really reduces heart attach risk? • P-value: 3.253e-07 (one sided Fisher’s test)

  16. Probability • Randomness • A phenomenon (or experiment) is called random if its outcome cannot be determined with certainty before it occurs • Coin tossing • Die rolling • Genotype of a baby

  17. Some genetics terms (1) • Gene: a segment of DNA sequence (can be transcribed to RNA and then translated to proteins) • Allele: An alternative form of a gene • Human genomes are diploid (two copies of each chromosome, except sex chromsome) • Homozygous, heterozygous: two copies of a gene are the same or different

  18. Some genetics terms (2) • Genotype • In bi-allele case (A or a), 3 possible outcomes AA, Aa, aa • Phenotype • Hair color, skin color, height • 小指甲两瓣(大槐树下先人后代?) • Genotype is the genetic basis of phenotype • Dominant, recessive • Phenotype may also depend on environment factors

  19. Probability • Sample Space S: • The collection of all possible outcomes • The sample space might contain infinite number of possible outcomes • Survival time (all positive real values)

  20. Probability • Probability: the proportion of times a given outcome will occur if we repeated an experiment or observation a large number of times • Given outcomes A and B • If A and B are disjoint

  21. Conditional probability • Conditional probability • In the die rolling case • E1 = {1,2,3}, E2 = {2,3} • P(E1|E2) = ?, P(E2|E1) = ? • Assume

  22. Law of Total Probability • From the conditional probability formula • In general we have

  23. Independence • If the outcome of one event does not change the probability of occurrence of the other event • For two independent events

  24. Bayesian rule

  25. Random variables and their Distributions (1) • Random variable X assigns a numerical value to each possible outcome of a random experiment • Mathematically, a mapping from the sample space to real numbers • For the bi-allelic genotype case, random variables X and Y can be defined as

  26. Random variables and their Distributions (2) • Probability distribution • A probability distribution specifies the range of a random variable and its corresponding probability • In the genotype example, the following is a probability distribution

  27. Random variables and their Distributions (3) • Discrete random variable • Only take discrete values • Finite or countable infinite possible values • Continuous random variable • take values on intervals or union of intervals • uncountable number of possible values • Sepal/petal length, width in the iris data • Weight, height, BMI …

  28. Distributions of discrete random variable (1) • Probability mass function (pmf) specifies the probability P(X=x) of the discrete variable X taking one particular value x (in the range of X) • In the genotype case • Summation of the pmf is 1 • Population mean, population variance

  29. Distributions of discrete random variable (2) • Bernoulli distribution • The pmf

  30. Distributions of discrete random variable (3) • Binomial distribution • Summation of n independent Bernoulli random variables with the same parameter • Denoted by • The pmf

  31. Distributions of discrete random variable (4) • Poisson distribution • A distribution for counts (no upper limits) • The pmf

  32. Distributions of discrete random variable (4) • Poisson distribution • A distribution for counts (no upper limits) • The pmf • Feller (1957) used for model the number of bomb hits in London during WWII • 576 areas of one quarter square kilometer each • λ=0.9323

  33. Distributions of continuous variables (1) • Use probability density function (pdf) to specify • If the pdf is f, then • Population mean, variance • Cumulative distribution (cdf) pdf

  34. Distributions of continuous variables (2) • Normal distribution • The pdf The distribution of the BMI variable in the data set Pima.tr can be viewed as a normal distribution (MASS package)

  35. Distributions of continuous variables (3) • Student’s t-distribution (William Sealy Gosset) • Chi-square distribution • Gamma distribution • F-distribution • Beta distribution

  36. Quantile-Quantile plot • Quantile-Quantile (QQ) plot • Comparing two distributions by plotting the quantiles of one distribution against the quantiles of the other distribution • For goodness of fit checking

More Related