Docsity

Statistics - I midterm, Appunti di Statistica

Toggle sidebar
bg1
+. Summation
1
+. Summation
Summation notation
→ a set of items
→ the item in the set (argument)
→ the summation index
→ starting point (lower limit)
→ ending point (upper limit)
Properties
Addition and subtraction
Sum of squares
Product of sums
x  =
i=m
∑
n
ix +
mx +
m+1 x +
m+2 ... + x
n
X
x
iith
i
i=m
n
(x ±
i=m
∑
n
iy ) =
i x ±
i=m
∑
n
i y
i=m
∑
n
i
(x ±
i=m
∑
n
iy )  =
i2
x ±
i=m
∑
n
i
2
2x y +
i=m
∑
n
i i y
i=m
∑
n
i
2
y x  =
i=m
∑
a
i
j=k
∑
b
j y x
i=m
∑
a
j=k
∑
b
i j
y x  =
i=m
∑
n
i
i=m
∑
n
i y x
i=m
∑
n
i=m
∑
n
i i
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28

Anteprima parziale del testo

Scarica Statistics - I midterm e più Appunti in PDF di Statistica solo su Docsity!

+. Summation 1

+. Summation

Summation notation

→ a set of items → the item in the set (argument) → the summation index → starting point (lower limit) → ending point (upper limit)

Properties

Addition and subtraction

Sum of squares

Product of sums

x =

i=m

n

i x^ m +x^ m+1 +x^ m+2 +... +^ xn

X

xi ith

i

i = m

n

(x ±

i=m

n

i y^ i )^ = x^ ±

i=m

n

i y

i=m

n i

(x ±

i=m

n

i y^ i )^2 = x^ ±

i=m

n i

2 2 x y +

i=m

n

i i y

i=m

n i

2

y x =

i=m

a i j=k

b

j y^ x

i=m

a

j=k

b i j

y x =

i=m

n i i=m

n

i y^ x

i=m

n

i=m

n i i

+. Summation 2

Constant product

where is a constant.

Sum of a constant

Sum of the index

Other formulas

y x =

i=m

n i i=m

n

i  y^ x

i=m

a i i

i=m

n

x i = α x

i=m

n i

i=m

n

α ⋅ (n − m + 1)

(x ±

i=m

n

i α)^ =^ x^ ±

i=m

n

i α^ ⋅ (n^ −^ m^ + 1)

i =

i=m

n

(m) + (m + 1) + (m + 2) + ... + n

i =

i=

n

1 + 2 + 3 + ... + n

i =

i=

n

n(n + 1)

i =

i=

n 2

n(n + 1)(2n + 1)

i =

i=

n

3 [ ]

n(n + 1) 2

1. Data basics

What is statistics?

💡 Statistics^ is the mathematical science involved in the collection,

analysis, interpretation, and presentation of data in order to find answers and make decisions.

Types of statistics

descriptive statistics : it organises and summarises data about a sample or a population using numbers and graphs inferential statistics : it makes inferences and draws conclusions about a population by examining a sample of that population

Statistics tools

Descriptive statistics uses:

measures of centre (mean, median, and mode) measures of spread (range, variance, and standard deviation)

Inferential statistics uses:

hypothesis testing (z test or t test) regression analysis (linear or non-linear)

Data basics

Data matrix

💡 A^ data matrix^ is a a

convenient and common way to organise data, especially if collecting data in a spreadsheet.

A data matrix is a rectangular table in which:

rows represent observations (or cases ) columns represent variables (or attributes )

Summary statistic

💡 A^ summary statistic^ is a single number summarising a large amount of data.

Example

Proportion with good outcomes in treatment group: 19/27  0.70  70% Proportion with good outcomes in control group: 5/26  0.19  19%

These two numbers 70% and 19% are examples of summary statistic.

Types of data

Data is a specific measurement of a variable – it is the value you record in your data sheet. Data is generally divided into two categories:

Qualitative (categorical) data , which represents groupings. Quantitative (numerical) data , which represents amounts.

Types of variables

Explanatory and response variables

When we suspect one variable might causally affect another, we label the first variable the explanatory variable and the second the response variable.

For many pairs of variables, there is no hypothesised relationship, and these labels would not be applied to either variable in such cases.

💡 A^ confounding^ variable is an extraneous variable that affects both the explanatory and the response variable and that make it seems like there is a relationship between the two.

In fact, the act of labelling the variables in this way does nothing to guarantee that a causal relationship exists. A formal evaluation to check whether one variable causes a change in another requires an experiment.

Observational studies and experiments

There are two primary types of data collection:

Observational study  Researchers collect data in a way that does not directly interfere with how the data arise (e.g., surveys). In general, observational studies can provide evidence of an association between the explanatory and response variables, but they cannot by themselves show a causal connection. Experiment  Researchers randomly assign subjects to various treatments in order to establish causal connections between the explanatory and response variables.

💡 Association^ ^ Causation^ → correlation does not imply causation, and causation can only be inferred from a randomised experiment.

Sampling principles and strategies

Populations and samples

Population of interest  The entire group that you want to draw conclusions about. Target population  A specific subset of the population of interest that is the focus of a particular study or analysis. Note: This term is often used interchangeably with "population of interest," but it can sometimes have a more specific connotation. The target population typically refers to the group of individuals or items to which the study's findings will be generalised. Sample  A smaller, manageable subset of either the population of interest or the target population that is selected for study to make generalisations or predictions about the larger group. Case  An individual unit of analysis within a sample, representing a single observation or data point.

Example

Population of Interest  All students in a school. Target Population  Students in the 7th grade. Sample  A group of 30 randomly selected 7th-grade students. Case  Each individual student in the sample, representing a single data point for analysis.

Anecdotal evidence

💡 The study is said to be^ blind^ when researchers keep the patients uninformed about their treatment.

It is possible thanks to a fake treatment (a placebo ) that is given to patients in the control group. Often times, a placebo results in a slight but real improvement in patients → the placebo effect.

💡 The study is said to be^ double-blind^ when doctors or researchers who interact with patients are, just like the patients, unaware of who is or is not receiving the treatment.

Examining numerical data

Scatterplots

💡 A^ scatterplot^ is a graph of plotted points that show the relationship between two numerical variables.

Dot plots

💡 A^ dot plot^ is a one-variable scatterplot.

Dot plots are useful for visualising one numerical variable. Darker colours represent areas where there are more observations.

The mean (or average ) is marked with a triangle in the above plot. In this case the mean GPA is 3.59.

Box plot

💡 A^ box plot^ summarises a data set using five statistics while also plotting unusual observations.

The steps in building a box plot are:

 Draw a dark line denoting the median , which splits the data in half.

 Draw a rectangle to represent the middle 50% of the data. The total length of the box is called the interquartile range IQR. The two boundaries of the box are called the first quartile Q1 (the 25th percentile) and the third quartile Q3 (the 75th percentile).

 Capture the data outside of the box with whiskers. However, their reach is never allowed to be more than 1.5 x IQR. max upper whisker reach  Q3  1.5  IQR max lower whisker reach  Q1  1.5  IQR  Label any observation lying beyond the whiskers with a dot. The purpose of labelling these points is to help identify any observations that appear to be unusually distant from the rest of the data. Unusually distant observations are called outliers.

Stacked dot plot

💡 A^ stacked dot plot^ is a one- variable scatterplot that displays frequencies using dots, piled one over the other.

IQR = Q 3 − Q 1

Bin width

The chosen bin widths can alter the story the histogram is telling.

Shape of distribution

Skewness

Right skewed – data sets with a long, thinner tail to the right. Left skewed – data sets with a long, thinner tail to the left. Symmetric – data sets that show roughly equal trailing off in both directions.

Modality

a single prominent peak ( unimodal ) several prominent peaks ( bimodal/multimodal ) no apparent peaks ( uniform )

Outliers

💡 A potential^ outlier^ is an observation that appears extreme relative to the rest of the data.

Frequency distribution

Absolute frequency

💡 The^ absolute frequency^ describes the number of times a particular value for a variable (data item) has been observed to occur.

→ value of variable , ( different values) → number of statistical units showing → sample size ( )

Relative frequency

💡 The^ relative frequency^ describes the number of times a particular value for a variable (data item) has been observed to occur in relation to the total number of values for that variable.

xi i X i = 1, 2, … , k k

ni xi

n n = n 1 + n 2 +… + nk

where is the number of units in the population. It is often not possible to calculate since the population data are rarely available.

Note: we calculated the simple mean, but sometimes we need to calculate the weighted mean (mean with frequency).

Mean with frequency distribution (distinct variables)

With a frequency distribution, the mean is computed as

Mean with frequency distribution (continuous variables)

If variable is continuous, values are grouped in bins ( classes ).

If we do not have the raw data, the mean can only be approximated. It is computed as

where is a value in the bin , typically:

Median

The median is the value that splits the data in half when ordered in ascending order.

N

x 1 + x 2 + ... + xN

N

x ˉ = =

n

∑ x i ni

∑ x i fi

X

x ˉ =∑ ci fi

ci ( x i −1 , x i ]

c i =

x i −1 + xi

If there are an even number of observations, then the median is the average of the two values in the middle. 0, 1, 2, 3, 4, 5  2.

Mean vs Median

If the distribution is symmetric, centre is often defined as the mean: mean ≈ median

If the distribution is skewed or has extreme outliers, centre is often defined as the median Right-skewed: mean > median Left-skewed: mean < median

Robust statistics

The median and IQR are called robust statistics because extreme observations have little effect on their values: moving the most extreme value generally has little influence on these statistics. On the other hand, the mean and standard deviation are more heavily influenced by changes in extreme observations, which can be important in some situations. Therefore:

for skewed distributions it is often more helpful to use median and IQR to describe the centre and spread for symmetric distributions it is often more helpful to use the mean and SD to describe the centre and spread

with bins as

The unbiased sample variance

The unbiased sample variance is roughly the average squared deviation from the mean.

Standard deviation

The sample standard deviation is the square root of the unbiased sample variance, and has the same units as the data.

Considering categorical data

Bar plots

💡 A^ bar plot^ is a common way to display a single categorical variable.

A bar plot where proportions instead of frequencies are shown is called a relative frequency bar plot.

s ~^2 = ( x − ) f

i =

N

i x ˉ^

2 i

s ~^2 = ( c − ) f

i =

k

i x ˉ^2 i

s^2 = =

n − 1

∑ i^ N =1^ ( x i − x ˉ) 2

s ~^2 ⋅

n − 1

n

s = s^2

Contingency tables

💡 A table that summarises data for two categorical variables is called a contingency table.

Each value in the table represents the number of times a particular combination of variable outcomes occurred.

Example

The contingency table below shows the distribution of studentsʼ genders and whether or not they are looking for a spouse while in college.

Does there appear to be a relationship between gender and whether the student is looking for a spouse in college?

To answer this question we examine the row proportions :

% Females looking for a spouse: 51/137  0. % Males looking for a spouse: 18/70  0.