Probability Statistics

Cover

statistiek test 1

Wat is statistiek en waarom is het belangrijk

Statistiek is een methodologie voor het verzamelen, analyseren, interpreteren en presenteren van gegevens om de wereld beter te begrijpen. Het is essentieel in sociale wetenschappen om kennis te genereren over de sociale werkelijkheid door middel van sociaalwetenschappelijk onderzoek en dataverzameling 2 3.

1.1 Wat is statistiek?

Statistiek kan gedefinieerd worden als de wetenschap die zich bezighoudt met het verzamelen, analyseren, interpreteren en presenteren van gegevens. Het fungeert als een kennismethode om de wereld om ons heen beter te doorgronden. Het proces binnen statistische analyse omvat probleemanalyse, het opzetten van een onderzoeksontwerp, dataverzameling, data-analyse en rapportage 2.

1.2 Waarom is statistiek belangrijk?

Statistiek is cruciaal om beweringen te onderbouwen en vereist empirie, wat betekent dat er behoefte is aan data en gegevens. In de sociale wetenschappen is het doel kennis te genereren over de sociale werkelijkheid, wat plaatsvindt door middel van dataverzameling. Een voorbeeld hiervan is de European Social Survey, die attitudes, geloofsovertuigingen en gedragspatronen peilt om de surveymethodologie te bevorderen. Statistiek stelt ons in staat om verschillen en samenhangen te verklaren, zoals de relatie tussen opleidingsniveau en inkomen 2 3.

Tip: Wees alert op misleidende statistiek. Dit kan voorkomen bij het verzamelen van gegevens, de presentatie van uitkomsten, en het formuleren van conclusies 2.

1.3 Soorten statistiek

Er zijn verschillende soorten statistiek die gebruikt worden binnen de analyse:

1.3.1 Beschrijvende statistiek

Beschrijvende statistiek, ook wel deductieve statistiek genoemd, richt zich op het beschrijven, ordenen en synthetiseren van verzamelde gegevens. Het doel is om de wereld in cijfers weer te geven 2 3.

Kenmerken van beschrijvende statistiek zijn:

  • Centrummaten: Deze beschrijven het centrum van een dataset, zoals het gemiddelde, de mediaan en de modus 2 3.
  • Spreidingsmaten: Deze geven de variatie binnen een dataset weer, zoals de standaardafwijking, variantie en interkwartielafstand 4.
  • Grafieken: Visuele representaties zoals histogrammen, taartdiagrammen en boxplots worden gebruikt om gegevens overzichtelijk te presenteren 4.

1.3.2 Inferentiële statistiek

Inferentiële statistiek, ook wel inductieve statistiek genoemd, maakt het mogelijk om op basis van gegevens uit een beperkt aantal gevallen conclusies te trekken over een bredere groep of populatie 2 4.

1.4 Terminologie en kernbegrippen

Voor een goed begrip van statistiek is het belangrijk om de volgende terminologie te kennen:

  • Onderzoekspopulatie: De gehele groep waarop een onderzoek gericht is 3.
  • Onderzoekseenheid (case): De individuele entiteit die onderzocht wordt, zoals een persoon, dier of object. Deze worden in een datamatrix in rijen weergegeven 3.
  • Variabele: Een kenmerk dat bestudeerd wordt en dat kan variëren tussen onderzoekseenheden. Variabelen worden in kolommen van een datamatrix geplaatst 3.
  • Datamatrix/dataset: Een tabel die onderzoekseenheden (rijen) en variabelen (kolommen) bevat, met de gemeten waarden in de cellen 3.
  • Steekproef: Een deelverzameling van de onderzoekspopulatie die daadwerkelijk wordt onderzocht. Vaak wordt gebruikgemaakt van een eenvoudig aselecte steekproef (EAS) ] 3.
  • Steekproefstatistieken: Kengetallen die gemeten worden in een steekproef. Voorbeelden zijn het steekproefgemiddelde (xˉ\bar{x}) en de steekproefstandaardafwijking (ss) ] 3.
  • Parameters: Kengetallen die de verdeling van een kenmerk in de gehele populatie beschrijven. Voorbeelden zijn het populatiegemiddelde (μ\mu) en de populatiestandaardafwijking (σ\sigma) ] 3.
Cover

Statistiek theorie.pptx

1. Inleiding tot statistiek en meetniveaus van variabelen

Dit onderwerp behandelt de fundamentele noodzaak van statistiek, de tweedeling tussen exploratief en inferentieel onderzoek, en introduceert essentiële begrippen zoals onderzoekseenheden en de vier meetniveaus van variabelen.

1.1 De Noodzaak van Statistiek

Statistiek is essentieel geworden omdat data nu overal en bijna gratis beschikbaar zijn. De schaarse factor is de vaardigheid om deze data te begrijpen, te verwerken, waarde eruit te extraheren en te communiceren.

Tip: De complexiteit van data vereist methoden om er gestructureerd inzicht uit te winnen, wat de basis vormt van statistische analyse.

1.2 Exploratief versus Inferentieel Onderzoek

Wetenschappelijk onderzoek kan worden onderverdeeld in twee hoofdtypes:

1.3 Exploratief Onderzoek

  • Doel: De werkelijkheid verkennen om wetmatigheden te ontdekken.
  • Methode: Inductief.
  • Centrale vraag: Wat is er aan de hand? (Dit valt onder de Beschrijvende statistiek).

1.4 Inferentieel Onderzoek

  • Doel: Wetenschappelijke hypothesen en theorieën toetsen op hun overeenstemming met de werkelijkheid. Het werkwoord 'to infer' betekent 'concluderen'.
  • Methode: Deductief, gebaseerd op hypothesen.
  • Centrale vraag: Klopt mijn verklaring? (Dit valt onder de Inferentiële statistiek).

Exploratief en inferentieel onderzoek vullen elkaar aan. Wetmatigheden ontdekt in exploratief onderzoek leiden tot theorieën en vervolgens hypothesen, die in inferentieel onderzoek worden getoetst.

1.5 Basisbegrippen: Data, Onderzoekseenheden en Variabelen

Goed wetenschappelijk onderzoek begint met een goede vraagstelling en dataverzameling.

1.6 Data

Data (of gegevens) zijn feiten die verzameld worden om antwoord te geven op gestelde vragen en vormen de basis voor informatie. Twee belangrijke concepten in data zijn onderzoekseenheden en variabelen.

1.7 Onderzoekseenheden

Onderzoekseenheden zijn de objecten waarop de statistiek zich richt. Dit kunnen zijn:

  • Personen
  • Dieren, planten
  • Instellingen (bijv. ziekenhuizen)
  • Groepen (bijv. studenten, onderwijsgroepen)

1.8 Variabelen en Metingen

Een Variabele is een kenmerk van de onderzoekseenheid (bijv. geslacht, gewicht, leeftijd, bloeddruk). Een Meting is de waarde (een getal of code) die aan een variabele wordt toegekend.

1.9 Meetniveaus van Variabelen

Het meetniveau van een variabele is cruciaal omdat dit bepaalt welke statistische bewerkingen zinvol zijn (bijvoorbeeld voor het berekenen van centrummaten). Er zijn vier niveaus, ingedeeld in kwalitatief en kwantitatief:

NiveauTypeKenmerkenVoorbeelden
NominaalKwalitatiefEnkel classificatie mogelijk, geen natuurlijke volgorde. Kan gecodeerd worden met getallen, maar deze geven geen kwantitatieve structuur.Geslacht (man, vrouw), Soort kanker (prostaat, long, darm).
OrdinaalKwalitatiefEr is een natuurlijke volgorde aanwezig die gerespecteerd moet worden.Sportprestatie (1ste, 2de, 3de plaats), Sociaal economische status (laag, midden, hoog).
IntervalKwantitatiefHeeft een volgorde en gelijke intervallen tussen waarden, maar geen absoluut nulpunt. Gemiddelden zijn zinvol.Temperatuur in Celsius of Fahrenheit, IQ-scores.
RatioKwantitatiefHeeft een volgorde, gelijke intervallen en een absoluut nulpunt. Verhoudingen (ratio's) zijn zinvol (bijv. 200 cm is tweemaal zo lang als 100 cm).Lengte (in cm/m), Gewicht (in gram/kg), Bloeddruk.

Tip: Nominale en ordinale variabelen zijn kwalitatief en laten over het algemeen geen berekeningen zoals het nemen van het gemiddelde toe. Het gemiddelde van opleidingen (lager, middelbaar, universitair) is bijvoorbeeld niet zinvol. Interval- en ratio-variabelen zijn kwantitatief en maken berekeningen mogelijk.

1.10 Beschrijvende Statistiek: Visualisatie en Frequentie

Beschrijvende statistiek richt zich op het samenvatten en beschrijven van verzamelde data, waarbij details verloren gaan ten gunste van overzicht.

1.11 Populatie en Steekproef

  • Populatie: De verzameling van alle elementen waarvoor de onderzoeksresultaten gelden.
  • Steekproef: Een representatieve deelverzameling van de populatie.

1.12 Frequentieverdeling

De verzameling van alle uitkomsten in een onderzoek met de geassocieerde frequenties wordt de frequentieverdeling genoemd. Deze kan worden weergegeven in een frequentietabel of grafiek. De belangrijkste kenmerken zijn centrum (rond welke waarde de uitkomsten liggen) en spreiding (hoe ver de uitkomsten uiteen liggen).

1.13 Grafische Weergaven

Afhankelijk van het meetniveau zijn verschillende grafieken geschikt:

  • Staafdiagram (Barchart): Geschikt voor nominale en ordinale variabelen (met een beperkt aantal waarden). De staven raken elkaar niet.
  • Histogram: Geschikt voor interval- en ratio-variabelen. De uitkomsten worden in klassen ondergebracht. D
Cover

statistiques descriptives_Cours DV (1).pptx

📚 statistiques descriptives_Cours DV (1).pptx

Brief overview

This document introduces the foundational concepts and methods of descriptive statistics. It provides tools for organizing, summarizing, and presenting data to understand its main characteristics. Mastering these techniques is essential for initial data exploration and informed decision-making.

Key points

  • Overview of descriptive statistics, its objectives, and core terminology
  • Techniques for organizing and visualizing single-variable data sets
  • Calculation and interpretation of central tendency measures for single variables
  • Application of dispersion measures and methods for class determination
  • Methods for analyzing relationships between two quantitative variables

1. Introduction to descriptive statistics and terminology

1.1 Purpose and scope of descriptive statistics

Descriptive statistics provides methods to organize, summarize, describe, and visualize data. Its primary objectives include:

  • Preparing data for further analysis.
  • Comparing different datasets or groups.

Descriptive statistics bridges raw data and meaningful insights.

1.2 Statistics vs. The Discipline of Statistics

The terms "statistics" and "statistics" (the discipline) are distinct:

TermDescription
Statistics (plural)Numerical data points or measures derived from observations (e.g., means, percentages, indices).
Statistics (discipline)The scientific field encompassing methods for collecting, analyzing, interpreting, and presenting data.

1.3 Definition and application of statistics

Statistics is the discipline dedicated to the methods used to describe and analyze observations (data). It involves gathering numerical data from large groups, analyzing it, interpreting findings, and making informed decisions based on this analysis.

  • Its applications are ubiquitous across:
    • Industry (e.g., reliability, quality control)
    • Economy and finance (e.g., surveys, marketing, insurance)
    • Health and environment sectors
    • Essentially any field where data is available.

1.4 The statistical process

The statistical process follows a structured methodology:

Data Collection → Statistical Analysis → Statistical Decision

  • Data Collection: The initial, systematic gathering of data from various sources (questionnaires, interviews, existing records) for a specific purpose.
  • Statistical Analysis: Organizing and structuring the collected data. This involves sorting, tabulating, and presenting data through charts or graphs.
  • Statistical Decision: Drawing conclusions and defining actions based on the assimilated analysis of the data.

1.5 Core terminology

Understanding key terms is fundamental to descriptive statistics.

TermDefinition
PopulationThe complete set of individuals or objects being studied for statistical analysis.
SampleA subset selected from the population under consideration.
Individual/UnitA single element belonging to a population or a sample.
Character/VariableA property or characteristic observed within the population or sample.
ModalityA specific value that a variable can take.
Series (statistical)The collection of observations or data points gathered.
Effectif (Count)The number of individuals within a population or sample. Also, the count of individuals possessing a specific modality of a variable.
FrequencyThe proportion of individuals possessing a specific modality, calculated as fi=ni/nfi = ni / n.
Cover

Stat Lesson 2.pdf

Table of contents

  1. Visualization of Qualitative data
  2. Visualization of Quantitative data 2
  3. Measures of Center & Variability
  4. Measures of Position & Relative Standing
  5. Five Number Summary 5

1. Visualization of Qualitative data

Data cleaning is done to make data easier to analyze. It involves removing irrelevant data, checking data types, and standardizing formats.

It also includes deciding how to handle missing values, removing duplicate records, and correcting errors like misspellings or incorrect codes. Identifying unusual observations is also part of this process.

Minor inconveniences or known false information do not always require removal from the dataset 1.

A frequency table lists items, events, or values and the number of times each occurs. It provides a summary of data values for a single variable.

  • Classes: These are the categories used to sort the data, such as labels or unique identifiers.
  • Frequency: This is the total number of observations that fall into a specific class.
  • Relative frequency: This expresses the frequency of a specific value as a proportion of the total number of observations 1.

A bar chart displays frequency using the height or length of each bar. It compares the absolute or relative size of various categories.

The categories are typically shown on the x-axis, and the frequency is shown on the y-axis. A bar chart is generally preferred over a pie chart because it can display all the information more clearly 1.

📝 A frequency table for survey responses about favorite colors might list "Blue" with a frequency of 50, "Red" with 35, and "Green" with 20. A bar chart would then show three bars, with heights corresponding to these frequencies for each color 1.

2. Visualization of Quantitative data 2

A histogram is a plot used to show the underlying frequency distribution, or shape, of a set of continuous data. While it can be used for discrete variables, it is most commonly applied to continuous data.

Instead of showing individual values, a histogram displays a range of values, with boundaries serving as borders between values, meaning there is no gap present 1.

Properties of a distribution help describe its shape:

  • Skewness: This measures the symmetry of the distribution.
  • Symmetric distribution: The left and right sides are mirror images of each other.
  • Negatively skewed: The tail points toward lower scores, indicating a skew to the left.
  • Positively skewed: The tail points toward higher scores, indicating a skew to the right.
  • Kurtosis: This describes the clustering in the tails of a distribution.
  • Platykurtic (<0): Has too few observations in the tails, resulting in a flatter distribution.
  • Mesokurtic (=0): Represents a typical distribution shape with no extreme flatness or peakedness.
  • Leptokurtic (>0): Has too many observations in the tails, resulting in a more peaked distribution 2.
Skewness TypeDescription
SymmetricLeft and right sides are reflections of each other.
Negatively skewedTail points toward lower scores (left side).
Positively skewedTail points toward higher scores (right side).
Kurtosis TypeDescription
Platykurtic (<0)Too few observations in the tails; flat distribution.
Mesokurtic (=0)Typical distribution shape; neither too flat nor too peaked.
Leptokurtic (>0)Too many observations in the tails; too peaked distribution.

📝 A histogram of exam scores might show a positively skewed distribution if most students scored high, but a few scored very low, creating a tail to the left 2.

3. Measures of Center & Variability

Measures of center and variability are used to communicate large amounts of information in simple terms. They help identify what looks normal and odd, and allow for comparisons of data on the same variable across different groups 2.

Center measures attempt to describe an entire set of data with a single value, identifying its central position.

  • Mean: This measure uses all values in the dataset. Extreme values can pull the mean. It is used for quantitative data and is best for symmetric histograms.
  • Population mean (μ\mu): μ=∑XN\mu = \frac{\sum X}{N}
  • Sample mean (xˉ\bar{x}): xˉ=∑xn\bar{x} = \frac{\sum x}{n}.
  • Median: This is the middlemost value in a dataset that has been ordered. It divides the dataset into upper and lower halves and is resistant to outliers. It is used for quantitative data and is good for skewed histograms. For an even number of data points, it is the average of the two middle values. 2.
  • Mode: This measure uses the counts of categories or classes and is used for categorical/qualitative data. It is the value with the highest frequency. A dataset can be un
Cover

STATS-2.pdf

A study guide on introductory statistics and inferential methods provides a comprehensive review of fundamental statistical concepts, data visualization, hypothesis testing, and regression techniques 1.

Introduction to statistics and data analysis

This guide reviews basic and advanced statistical concepts—from descriptive statistics and probability distributions to hypothesis testing, regression, and multivariate measures—to prepare you thoroughly for exams 1.

1. Descriptive statistics and data visualization

1.1 Summarizing data

  • Frequency distributions: Describe how often each value or category occurs; tables must have mutually exclusive and exhaustive categories 8.
  • Measures of central tendency:
    • Mode: The most frequently occurring score; best for nominal data 12.
    • Median: The middle score when data are ordered; suitable for ordinal and skewed interval/ratio data 13.
    • Mean: The arithmetic average sensitive to every score and outliers; represents the balance point of a symmetric distribution 13 14.

Tip: When summarizing data, always check if the distribution is skewed; if so, the median might be more representative than the mean 14.

1.2 Measures of dispersion

  • Range: Difference between the highest and lowest scores; limited because it relies on only two values 17.
  • Interquartile range (IQR): The middle fifty percent of observations, less affected by outliers 17 18.
  • Variance and Standard deviation: Variance is the average squared deviation from the mean; standard deviation is its square root, indicating the “average” distance from the mean 19 20.

1.3 Data visualization techniques

  • Histograms: Display frequency for interval/ratio data as adjoining bars, allowing visualization of shape and central tendency 12 12.
  • Boxplots: Graphically summarize the distribution via the five-number summary (minimum, Q1, median, Q3, maximum) and help identify outliers 22.
  • Scatterplots: Show the relationship between two interval/ratio variables; clustering around a line indicates the strength of a linear relationship 93.

Note: Always check scatterplots for linearity and even spread (homoscedasticity) before applying regression analysis 94.

2. Probability and the normal distribution

2.1 The normal (Gaussian) distribution

  • Key properties: Bell-shaped curve characterized by symmetry, unimodality, and the famous 68–95–99 rule (about 68% within 1 standard deviation, 95% within 2, and 99% within 3) 21 23.

2.2 Standardization and Z-scores

  • Z-score calculation:
    Z=X−XˉsZ = \frac{X - \bar{X}}{s}
    where XX is the raw score, Xˉ\bar{X} is the mean, and ss is the standard deviation 23.
  • Usage: Z-scores standardize different datasets, permitting comparisons and determination of probabilities using the standard normal table 23 24.

Important: The 68–95–99 rule helps in making predictions about data distribution under the normal curve 23.

3. Sampling and estimation

3.1 Sampling techniques

  • Importance of sampling: Because surveying entire populations is often infeasible, techniques like simple random sampling (SRS), systematic, stratified, and cluster sampling are used to obtain representative samples 28 30.
  • Sampling distribution: The distribution of sample statistics; the Central Limit Theorem ensures that, with a large enough sample size (typically n≥100n\ge 100), the distribution of the sample means approaches normality regardless of the underlying population distribution 32 33.

3.2 Estimation procedures

  • Point estimates vs. confidence intervals:

    • A point estimate is a single statistic (e.g., the sample mean).
    • A confidence interval provides a range, with a given level of confidence, that likely contains the population parameter 35.
  • Confidence intervals for means:

    • When the population standard deviation is known, use the Z distribution.
    • When unknown, use the t-distribution with appropriate degrees of freedom 36 37.
Cover

stat samenvatting testen.pdf

Overzicht van biostatistische testen

Dit document geeft een overzicht van biostatistische testen, ingedeeld op basis van het type data en de onderzoeksvraag (verschillen of relaties), en onderscheidt parametrische van non-parametrische benaderingen met hun assumpties 2.

1.1 Parametrische versus non-parametrische testen

Biostatistische testen kunnen worden onderverdeeld in parametrische en non-parametrische benaderingen. De keuze tussen deze twee hangt af van of de assumpties voor parametrische testen voldaan zijn 2.

1.1.1 Parametrische testen

Parametrische testen gaan ervan uit dat de data een specifieke verdeling volgt, vaak een normale verdeling. Ze worden gebruikt voor continue data en wanneer de assumpties voldaan zijn 2.

  • Verschillen tussen groepen:

  • Twee groepen: Student's unpaired T-test (voor onafhankelijke groepen) of Paired T-test (voor afhankelijke/gepaarde groepen) ] 2.

  • Tip: Indien de resultaten significant zijn, kunnen paarsgewijze testen zoals Tukey's of Bonferroni's worden toegepast voor verdere analyse 2.

  • Meer dan twee groepen: ANOVA (Analysis of Variance) ] 2.

  • Tip: Indien de resultaten significant zijn, kunnen paarsgewijze testen zoals Tukey's of Bonferroni's worden toegepast voor verdere analyse 2.

  • Relaties tussen variabelen:

  • Pearson's correlatie (r): Meet de lineaire relatie tussen twee continue variabelen 2.

1.1.2 Non-parametrische testen

Non-parametrische testen hebben minder strikte assumpties over de datadistributie en worden vaak gebruikt wanneer de assumpties van parametrische testen niet voldaan zijn of wanneer de data discreet of categorisch is 2.

  • Verschillen tussen groepen:

  • Twee groepen: Mann-Whitney U test of Wilcoxon rank sum test (voor onafhankelijke groepen) . Indien de resultaten significant zijn, kunnen paarsgewijze testen met de Wilcoxon-Mann-Whitney test worden uitgevoerd 2.

  • Meer dan twee groepen: Kruskal-Wallis Test 2.

  • Tip: Indien significant, kunnen paarsgewijze testen met de Wilcoxon-Mann-Whitney test worden toegepast 2.

  • Relaties tussen variabelen:

  • Spearman's rank correlation: Meet de rang-ordinale relatie tussen twee variabelen 2.

1.2 Testen op basis van data type en onderzoeksvraag

De keuze voor een biostatistische test hangt af van het type data (discreet/categorisch of continu) en de onderzoeksvraag (verschillen of relaties) ] 2.

1.2.1 Testen voor verschillen

  • Continue data:
  • Twee groepen: Student's unpaired T-test, Paired T-test (parametrisch) of Mann-Whitney U/Wilcoxon rank sum test (non-parametrisch) ] 2.
  • Meer dan twee groepen: ANOVA (parametrisch) of Kruskal-Wallis test (non-parametrisch) ] 2.
  • Discreet/categorische data:
  • Pearson's chi-square tests: Gebruikt voor het onderzoeken van verschillen of relaties tussen categorische variabelen. Deze kunnen worden toegepast op one-sample en two-sample situaties 2.

1.2.2 Testen voor relaties

  • Pearson's correlatie (r): Voor continue data 2.
  • Spearman's rank correlation: Voor rang-ordinale data 2.

1.3 Overwegingen bij de keuze van testen

1.3.1 Assumpties en data transformatie

Bij de keuze van een statistische test is het cruciaal om te evalueren of de assumpties van de test voldaan zijn. Indien de assumpties voor parametrische testen niet voldaan zijn, kan data transformatie een optie zijn om de assumpties te normaliseren. Indien data transformatie niet slaagt, moet worden uitgeweken naar een non-parametrische test 2.

1.3.2 Onafhankelijke data

De testen worden ook geselecteerd op basis van de onafhankelijkheid van de data. Voor onafhankelijke data worden andere testen gebruikt dan voor afhankelijke of gepaarde data 2.

  • Tip: Een handig schema op basis van data type, de onderzoeksvraag en parametrische/non-parametrische benaderingen helpt bij het maken van de juiste keuze 2.

Relaties en correlaties in data

Dit hoofdstuk behandelt methoden voor het onderzoeken van relaties tussen variabelen, met een focus op correlatieanalyses en regressieanalyse 2.

2.1 Correlatieanalyse

Correlatieanalyse wordt gebruikt om de sterkte en richting van de lineaire relatie tussen twee continue variabelen te meten. Er zijn verschillende typen correlatieanalyses, afhankelijk van de aard van de data en de te onderzoeken relatie 2.

2.1.1 Pearson's correlatiecoëfficiënt (rr)

Pearson's correlatiecoëfficiënt, aangeduid met rr, meet de sterkte van de lineaire relatie tussen twee continue variabelen. De waarde van rr ligt tussen -1 en +1 2.

  • Een waarde van +1 geeft een perfecte positieve lineaire relatie aan.
  • Een waarde van -1 geeft een perfecte negatieve line
Cover

stat_sampling distribution.pdf

Table of contents

  1. Sampling distribution (Part 1)
  2. Example 1
  3. Example 2

1. Sampling distribution (Part 1)

1.1 Population and sample

The terms "population" and "sample" are collective nouns. This means they refer to a group of individuals or items, rather than a single one.

For instance, when discussing registered voters, a study might involve one random sample of 2400 voters, not 2400 separate random samples 3.

📝 A study might involve one random sample of 2400 registered voters, not 2400 separate random samples 3.

1.2 Parameter and statistic

A parameter is a numerical characteristic of a population. A statistic is a numerical characteristic of a sample 4.

1.3 Probability distribution

A probability distribution shows the probabilities for all possible values of a random variable 5.

1.4 Sampling distribution

A sampling distribution is a probability distribution that displays the probabilities for all possible values of a statistic. These values are derived from all possible samples of a specific size, taken from a larger population 6.

The following examples use very small population and sample sizes to make the concept of sampling distribution easier to understand. These are not realistic scenarios but are used for educational purposes 7.

2. Example 1

2.1 Constructing a sampling distribution

This section demonstrates how to build a sampling distribution using a small population. A sampling distribution shows all possible sample means and their probabilities.

It helps us understand how sample statistics relate to population parameters 8.

  • Population: A group of individuals or items from which samples are drawn. In this example, the population consists of five people.
  • Sample: A subset of the population selected for study. Here, the researcher samples two people from the population.
  • Population mean: The average of all values in the population. The goal is to estimate this value 8.
  • Sampling distribution: A probability distribution of a statistic (like the sample mean) calculated from all possible samples of a given size from a population 15.

2.2 Assigning codes to population values

To make it easier to track individuals, each person in the population can be assigned a code. This step is optional but can help organize the data 9.

  • Person A: Height 60 inches
  • Person B: Height 60 inches
  • Person C: Height 64 inches
  • Person D: Height 66 inches
  • Person E: Height 68 inches 9.

📝 The number of ways to select a sample of 2 people from a population of 5 is calculated as 5C2=5!2!(5−2)!=10^5C_2 = \frac{5!}{2!(5-2)!} = 10 10.

2.3 Determining the number of possible samples

The number of ways to select a sample of a specific size from a population without regard to the order of selection is calculated using combinations. The formula for combinations is nCk=n!k!(n−k)!^nC_k = \frac{n!}{k!(n-k)!}, where nn is the population size and kk is the sample size 10.

  • Population size (n): 5 people
  • Sample size (k): 2 people
  • Number of possible samples: 5C2=5!2!(5−2)!=5×42×1=10^5C_2 = \frac{5!}{2!(5-2)!} = \frac{5 \times 4}{2 \times 1} = 10. There are 10 unique combinations of two people that can be selected from the group of five 10.

2.4 Listing all possible samples

All possible combinations of two people from the population of five are listed. Each combination represents one possible sample that could be drawn 11.

  • AB
  • AC
  • AD
  • AE
  • BC
  • BD
  • BE
  • CD
  • CE
  • DE 11.

It is important to remember that in a real research study, only one of these possible samples is actually observed. The other combinations exist but are unknown to the researcher 12.

📝 If the sample is BC, with heights 60 and 64 inches, the sample mean is (60 + 64) / 2 = 62 inches 13.

2.5 Computing the statistic for each sample

For each possible sample, the mean height is calculated. This mean is the statistic of interest for constructing the sampling distribution 13.

Possible samplesActual sample valuesMean (X-bar)
AB60, 6060
AC60, 6462
AD60, 6663
AE60, 6864
BC60, 6462
BD60, 6663
BE60, 6864
CD64, 6665
CE64, 6866
DE66, 6867

Even though there are many possible sample means, a researcher typically only knows the mean of the single sample they have collected 14.

2.6 Constructing the sampling distribution

The sampling distribution is created by listing each unique sample mean and the probability of obtaining that mean. The probability is calculated by dividing the number of times a specific mean appears by the total number of possible samples 15.

  • **The ten possible sample
Cover

stat_sampling distribution.pdf

Table of contents

  1. Sampling distribution (Part 1)
  2. Example 1
  3. Example 2

1. Sampling distribution (Part 1)

1.1 Population and sample

The terms "population" and "sample" are collective nouns. This means they refer to a group of individuals or items, rather than a single one.

For instance, when discussing registered voters, a study might involve one random sample of 2400 voters, not 2400 separate random samples 3.

📝 A study might involve one random sample of 2400 registered voters, not 2400 separate random samples 3.

1.2 Parameter and statistic

A parameter is a numerical characteristic of a population. A statistic is a numerical characteristic of a sample 4.

1.3 Probability distribution

A probability distribution shows the probabilities for all possible values of a random variable 5.

1.4 Sampling distribution

A sampling distribution is a probability distribution that displays the probabilities for all possible values of a statistic. These values are derived from all possible samples of a specific size, taken from a larger population 6.

The following examples use very small population and sample sizes to make the concept of sampling distribution easier to understand. These are not realistic scenarios but are used for educational purposes 7.

2. Example 1

2.1 Constructing a sampling distribution

This section demonstrates how to build a sampling distribution using a small population. A sampling distribution shows all possible sample means and their probabilities.

It helps us understand how sample statistics relate to population parameters 8.

  • Population: A group of individuals or items from which samples are drawn. In this example, the population consists of five people.
  • Sample: A subset of the population selected for study. Here, the researcher samples two people from the population.
  • Population mean: The average of all values in the population. The goal is to estimate this value 8.
  • Sampling distribution: A probability distribution of a statistic (like the sample mean) calculated from all possible samples of a given size from a population 15.

2.2 Assigning codes to population values

To make it easier to track individuals, each person in the population can be assigned a code. This step is optional but can help organize the data 9.

  • Person A: Height 60 inches
  • Person B: Height 60 inches
  • Person C: Height 64 inches
  • Person D: Height 66 inches
  • Person E: Height 68 inches 9.

📝 The number of ways to select a sample of 2 people from a population of 5 is calculated as 5C2=5!2!(5−2)!=10^5C_2 = \frac{5!}{2!(5-2)!} = 10 10.

2.3 Determining the number of possible samples

The number of ways to select a sample of a specific size from a population without regard to the order of selection is calculated using combinations. The formula for combinations is nCk=n!k!(n−k)!^nC_k = \frac{n!}{k!(n-k)!}, where nn is the population size and kk is the sample size 10.

  • Population size (n): 5 people
  • Sample size (k): 2 people
  • Number of possible samples: 5C2=5!2!(5−2)!=5×42×1=10^5C_2 = \frac{5!}{2!(5-2)!} = \frac{5 \times 4}{2 \times 1} = 10. There are 10 unique combinations of two people that can be selected from the group of five 10.

2.4 Listing all possible samples

All possible combinations of two people from the population of five are listed. Each combination represents one possible sample that could be drawn 11.

  • AB
  • AC
  • AD
  • AE
  • BC
  • BD
  • BE
  • CD
  • CE
  • DE 11.

It is important to remember that in a real research study, only one of these possible samples is actually observed. The other combinations exist but are unknown to the researcher 12.

📝 If the sample is BC, with heights 60 and 64 inches, the sample mean is (60 + 64) / 2 = 62 inches 13.

2.5 Computing the statistic for each sample

For each possible sample, the mean height is calculated. This mean is the statistic of interest for constructing the sampling distribution 13.

Possible samplesActual sample valuesMean (X-bar)
AB60, 6060
AC60, 6462
AD60, 6663
AE60, 6864
BC60, 6462
BD60, 6663
BE60, 6864
CD64, 6665
CE64, 6866
DE66, 6867

Even though there are many possible sample means, a researcher typically only knows the mean of the single sample they have collected 14.

2.6 Constructing the sampling distribution

The sampling distribution is created by listing each unique sample mean and the probability of obtaining that mean. The probability is calculated by dividing the number of times a specific mean appears by the total number of possible samples 15.

  • **The ten possible sample
Cover

Stats Midterm Study Guide.pdf

Table of contents

  1. Unit 1: Introduction to Statistics & Exploratory Data Analysis
  2. Unit 2: Probability & Bayes’ Theorem
  3. Unit 3: Random Variables & Probability Distributions
  4. Unit 4: Statistical Estimation & Confidence Intervals
  5. Unit 5: Decision Making & Hypothesis Testing
  6. Quick Reference Sheet (Cheatsheet)

1. Unit 1: Introduction to Statistics & Exploratory Data Analysis

1.1 Core concepts: Population vs. sample

Statistics involves using data from a sample to make inferences about a larger population 1.

  • Population: This is the complete set of all elements, individuals, or measurements under investigation, denoted by NN.
  • Sample: This is a representative subset drawn from the population, denoted by nn.
  • Parameter: This is a fixed numerical characteristic of a population, such as the population mean (μ\mu) or population standard deviation (σ\sigma), which is usually unknown.
  • Statistic: This is a numerical value computed directly from sample data, such as the sample mean (xˉ\bar{x}) or sample standard deviation (ss), and it varies from sample to sample 1.

1.2 Types of data 2

Data can be broadly classified into qualitative (categorical) and quantitative (numerical) types, each with distinct characteristics 2.

Data TypeDescriptionExamples
Qualitative (Categorical)Non-numerical characteristics or labels['Part type', 'Defect code', 'Pass/fail status']
Quantitative (Numerical) - DiscreteValues obtained by counting with distinct, separated integer points['Number of defective items (0, 1, 2,...)']
Quantitative (Numerical) - ContinuousValues obtained by measurement on a continuous scale; can take any real value within an interval['Length', 'Voltage', 'Processing time (12.4 s, 12.45 s)']

1.3 Measures of central tendency & dispersion

Measures of central tendency describe the center of a data set, while measures of dispersion describe its spread 3.

  • Sample mean (xˉ\bar{x}): This is the sum of all data points divided by the number of data points. xˉ=1n∑i=1nxi=x1+x2+⋯+xnn\bar{x} = \frac{1}{n}\sum_{i=1}^{n}x_i = \frac{x_1 + x_2 + \dots + x_n}{n}
  • Median: This is the middle value when data is sorted in ascending order.
  • If nn is odd, the median is at position n+12\frac{n+1}{2}.
  • If nn is even, it is the average of the two middle values at positions n2\frac{n}{2} and n2+1\frac{n}{2} + 1.
  • Mode: This is the observation that appears most frequently in the data set.
  • Sample variance (s2s^2): This measures the average of the squared differences from the mean. s2=1n−1∑i=1n(xi−xˉ)2=∑xi2−(∑xi)2/nn−1s^2 = \frac{1}{n-1}\sum_{i=1}^{n}(x_i - \bar{x})^2 = \frac{\sum x_i^2 - (\sum x_i)^2/n}{n-1}
  • Sample standard deviation (ss): This is the square root of the sample variance, indicating the typical distance of data points from the mean. s=s2s = \sqrt{s^2}
  • Interquartile range (IQR): This measures the spread of the middle 50% of the data 3.
  • IQR: It is calculated as the difference between the third quartile (Q3Q_3) and the first quartile (Q1Q_1).
  • Outliers: Values outside the lower fence (Q1−1.5×IQRQ_1 - 1.5 \times \text{IQR}) and upper fence (Q3+1.5×IQRQ_3 + 1.5 \times \text{IQR}) are classified as outliers.

📝 For concrete test cubes with compressive strengths of 20 MPa, 22 MPa, 26 MPa, 24 MPa, and 28 MPa, the sample mean is calculated as xˉ=20+22+26+24+285=1205=24.0 MPa\bar{x} = \frac{20+22+26+24+28}{5} = \frac{120}{5} = 24.0 \text{ MPa}. The sum of squared deviations is 40, leading to a sample variance s2=405−1=10.0 MPa2s^2 = \frac{40}{5-1} = 10.0 \text{ MPa}^2, and a standard deviation s=10.0≈3.16 MPas = \sqrt{10.0} \approx 3.16 \text{ MPa} 4.

📝 For microchip resistances (in Ω\Omega) of 98, 102, 100, 105, 99, 101, 103, 150, sorted data is 98, 99, 100, 101, 102, 103, 105, 150. The median is 101+1022=101.5Ω\frac{101+102}{2} = 101.5 \Omega. Q1Q_1 is 99+1002=99.5Ω\frac{99+100}{2} = 99.5 \Omega, and Q3Q_3 is 103+1052=104.0Ω\frac{103+105}{2} = 104.0 \Omega. The IQR is 104.0−99.5=4.5Ω104.0 - 99.5 = 4.5 \Omega. The upper fence is 104.0+1.5(4.5)=110.75Ω104.0 + 1.5(4.5) = 110.75 \Omega. Since 150 Ω\Omega is greater than 110.75 Ω\Omega, it is an outlier 5 6.

2. Unit 2: Probability & Bayes’ Theorem

2.1 Essential Probability Rules

Essential probability rules define how to calculate probabilities for various event relationships, forming the foundation for more complex analyses.

  • Complement Rule: The probability of an event not occurring is 1 minus the probability of it occurring. P(Ac)=1−P(A)P(A^c) = 1 - P(A)
  • General Addition Rule: The probability of either event A or event B occurring is the sum of their individual probabilities minus the probability of both occurring. P(A∪B)=P(A)+P(B)−P(A∩B)P(A \cup B) = P(A) + P(B) - P(A \cap B)
  • Conditional Probability: The probability of event A occurring given that event B has already occurred. P(A∣B)=P(A∩B)P(B)P(A|B) = \frac{P(A \cap B)}{P(B)}
  • General Multiplication Rule: The probability of bot
Cover

Stats.Sum.notes.pdf

Basic R operations and data manipulation

This section covers fundamental R operators, data storage mechanisms, and initial steps for loading data and packages in R.

1.1 Basic operators

R utilizes several operators for performing arithmetic operations and storing data.

1.1.1 Arithmetic operators

  • Addition and Subtraction: The + or - operators are used for adding or subtracting values 1.
  • Multiplication: The * operator is used for multiplication 1.
  • Division: The / operator is used for division 1.
  • Exponentiation: The ^ operator is used to raise a number to a power 1.

1.1.2 Data storage operator

  • Assignment: The <- operator is used to store data or results into objects or variables 1.

Example: To store the text "apples" into an object named c, you would use c <- "apples" 1. Example: To store a sequence of numbers (1, 2, 3) into an object named c, you would use c <- c(1,2,3) 1.

1.1.3 Comments

  • The # symbol is used to ignore lines of code, effectively making them comments 1.

1.2 Vectors

Vectors are fundamental data structures in R that can hold multiple values, which can be either text (letters) or numbers 1.

  • Creating vectors: The c() function (which stands for combine) is used to create vectors by listing the values within the parentheses 1.
  • For text, values should be enclosed in double quotes ("") 1.
  • For numbers, no quotes are needed 1.

Example: To create a vector named d with the numeric values 3, 7, and 1, you would use d <- c(3,7,1) 1.

  • Accessing vector elements:
  • To recall a specific value from a vector, you use square brackets [] with the index (position) of the element. For example, d would recall the second data value from vector d, which is 7 1 2.

1.3 Data frames and indexing

Data frames are tabular data structures in R. Specific elements within a data frame can be accessed using a specific indexing syntax.

  • Accessing elements: The syntax dataframe[row, column] is used to recall a specific value from a table 1 2.

Example: d would recall the element at the second row and third column of a data frame named d 1 2 .

1.4 Loading data and packages

R provides functions to load external data files and to utilize pre-written functionalities from packages.

1.4.1 Loading data files

  • RData files: The load("filename.rdata") command is used to load data stored in an RData file 1.
  • CSV files: The read.csv("filename.csv", row.names = 1) command is used to import data from a CSV file. The row.names = 1 argument correctly sets the first column as row names 1.

1.4.2 Working directory management

  • Checking the current directory: The getwd() function returns the path of the current working directory 2.
  • Setting the working directory: The setwd("folder address") command is used to change the current working directory to a specified folder address 2.

1.4.3 Package management

  • Installing packages: The install.packages("package name") command is used to download and install a package from a repository 2.
  • Loading packages: The library("package name") command makes the functions and data within an installed package available for use in the current R session 2.

1.5 Investigating and manipulating data

R offers various tools for examining and modifying the structure and content of data.

1.5.1 Data examination

  • Subsetting data: The $ operator is used to extract a specific column from a data frame. For instance, cars$mpg retrieves the mpg column from the cars data frame 2.
  • Recalling column names: The names(dataframe) function returns a vector containing the names of all columns in the specified data frame 2.
  • Viewing data subsets:
  • head(dataframe) displays the column names and the first 6 rows of a data frame 2.
  • head(dataframe, n=x) displays the column names and the first x rows of a data frame. This can be used to view all rows if x is set to the total number of rows using nrow() 2.
  • Counting dimensions:
  • nrow(dataframe) returns the number of rows in a dataset 2.
  • ncol(dataframe) returns the number of columns in a dataset 2.
  • Converting data types: The dataframe$column <- factor(dataframe$column) command converts the data in a specified column into a factor class. This can also be applied to convert data into integer or numeric classes 2.
  • Checking data class: The class(dataframeUSDcolumn) function is used to determine the data type (class) of a variable or column [2](#page