Prepare for your exams

Study with the several resources on Docsity

Earn points to download

Earn points by helping other students or get them with a premium plan

Guidelines and tips

Prepare for your exams

Study with the several resources on Docsity

Earn points to download

Earn points by helping other students or get them with a premium plan

Community

Ask the community

Ask the community for help and clear up your study doubts

University Rankings

Discover the best universities in your country according to Docsity users

Free resources

Our save-the-student-ebooks!

Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors

Random variable Probability Descriptive statistics

Typology: Thesis

2022/2023

1 / 36

Download Descriptive statistics and more Thesis Descriptive statistics in PDF only on Docsity! Lecture 2: Descriptive Statistics and Exploratory Data Analysis Further Thoughts on Experimental Design Pop 1 Pop 2 Repeat 2 times processing 16 samples in total Repeat entire process producing 2 technical replicates for all 16 samples Randomly sample 4 individuals from each pop Tissue culture and RNA extraction Labeling and array hybridization Slide scanning and data acquisition • 16 Individuals (8 each from two populations) with replicates Population Sample Inferential Statistics Descriptive Statistics Probability “Central Dogma” of Statistics EDA Before making inferences from data it is essential to examine all your variables. Why? To listen to the data: - to catch mistakes - to see patterns in the data - to find violations of statistical assumptions - to generate hypotheses …and because if you don’t, you will have trouble later Types of Data Categorical Quantitative continuousdiscreteordinalnominalbinary 2 categories more categories order matters numerical uninterrupted Location: Mean 1. The Mean To calculate the average of a set of observations, add their value and divide by the number of observations: x ! x = x 1 + x 2 + x 3 + ...+ x n n = 1 n x i i=1 n " Other Types of Means Weighted means: Trimmed: ! x = w i x i i=1 n " w i i=1 n " Harmonic:Geometric: ! x =" ! x = n 1 x ii=1 n " ! x = x i i=1 n " # $ % & ' ( 1 n Location: Median • Median – the exact middle value • Calculation: - If there are an odd number of observations, find the middle value - If there are an even number of observations, find the middle two values and average them • Example Some data: Age of participants: 17 19 21 22 23 23 23 38 Median = (22+23)/2 = 22.5 Why Squared Deviations? • Adding deviations will yield a sum of ? • Absolute values do not have nice mathematical properties • Squares eliminate the negatives • Result: – Increasing contribution to the variance as you go farther from the mean. Scale: Standard Deviation • Variance is somewhat arbitrary • What does it mean to have a variance of 10.8? Or 2.2? Or 1459.092? Or 0.000001? • Nothing. But if you could “standardize” that value, you could talk about any variance (i.e. deviation) in equivalent terms • Standard deviations are simply the square root of the variance Scale: Standard Deviation ! ˆ " = (x i # x ) 2 i n $ n #1 1. Score (in the units that are meaningful) 2. Mean 3. Each score’s deviation from the mean 4. Square that deviation 5. Sum all the squared deviations (Sum of Squares) 6. Divide by n-1 7. Square root – now the value is in the units we started with!!! Scale: Quartiles and IQR 25% 25% 25% 25% • The first quartile, Q1, is the value for which 25% of the observations are smaller and 75% are larger • Q2 is the same as the median (50% are smaller, 50% are larger) • Only 25% of the observations are greater than the third quartile Q1 Q2 Q3 IQR Percentiles (aka Quantiles) In general the nth percentile is a value such that n% of the observations fall at or below or it n% Median = 50th percentile Q1 = 25th percentile Q2 = 75th percentile Graphical Summaries of Data A (Good) Picture Is Worth A 1,000 Words More on Histograms • What’s the difference between a frequency histogram and a density histogram? More on Histograms • What’s the difference between a frequency histogram and a density histogram? Frequency Histogram Density Histogram Box Plots Q3 maximum IQR minimum median 0.0 33.3 66.7 100.0 AGE Variables Y ea rs Q1 How to Make a Bad Graph The aim of good data graphics: Display data accurately and clearly Some rules for displaying data badly: – Display as little information as possible – Obscure what you do show (with chart junk) – Use pseudo-3d and color gratuitously – Make a pie chart (preferably in color and 3d) – Use a poorly chosen scale From Karl Broman: http://www.biostat.wisc.edu/~kbroman/ Example 1 Example 2
Distribution of genotypes
9%
21%
22% DAA
BAB
OBB
ONA
48%
luciferase activity
ands
yo an oo
oocUlUlUlhllCOCO COCO
untrt
Example 5
IFN dsRNA
SV
R Tutorial • Calculating descriptive statistics in R • Creating graphs for different types of data (histograms, boxplots, scatterplots) • Useful R commands for working with multivariate data (apply and its derivatives) • Basic clustering and PCA analysis