Docsity

Formulario di Statistica (statistics), Formulari di Statistica

Toggle sidebar
bg1
DESCRIPTIVE STATISTICS
-DEFINITION
- Population : Total collection of all the elements that we are interested in
- Statistical units : Single elements of the population
- Variable : Features or characteristics of statistical units
- Sample : Subgroup of the population that we are able to study in detail
CLASSES
- Pairs of values that have some relationship to each other → (x, y)
→x qualitative and y quantitative → distinct histograms, one for each category of x
→x and y quantitative → scatter plot (↗ positive | ↘ negative correlation)
- GROUPED DATA : Classes interval use : [ ; ) → “having n1 to n2 means that n2 - n1 is the interval”
→Take the mid value in order to compute the sample mean [n = mid-value = average of the extremes]
-SAMPLE STATISTICS
VARIABLES TYPE
Quantitative (numerical)
Qualitative (categorical)
continuous
(weight, height, age)
discrete
(number of)
ordinal
(disag., neut., ag.)
nominal
(alive or dead)
mean
yes
no
no
median
yes
yes
no
mode
yes
yes
yes
graph
line graph, bar plot, frequency polygon
bar chart (abs. or rel. f.) or pie chart (rel. f.)
SYMMETRY
-FREQUENCY
-x0 is symmetric :
→frequencies x0 - c = x0 + c for any c
→mode = mx = ×
w=f
n
-CENTRALITY MEASURES
-VARIATION - SPREAD
-SAMPLE MEAN
SAMPLE MEDIAN
SAMPLE MODE
SAMPLE VARIANCE
STANDARD DEVIATION
the data value that
occurs most
frequently
POPULATION
× → µ
s2 → σ2
P^ → p
MEAN - MEDIAN RELATIONSHIP
CORRELATION
symmetric
× = mx
right-skewed
× > mx
lef-skewed
× < mx
weighted mean
×&=&ΣN
i=1&xi
n&=&(x1&+&...&+&xn)
n
×&=&Σk
i=1&fi&xi
n&=&Σk
i=1&wi&xi
SAMPLE RANGE
maximum - minimum
larger range → l. var.
s&=&s2
r&=&sxy
sx&·&sy
&=&Σ&xi&yi&-&n&·&×&y
(Σ&x2
i&-&n&·&×2)&·&(Σ&yi2&-&n&·&y2)
1. Order from
smallest to larger
→n odd : xn/2 +1
→n even :
xn/2&+&xn/2(+1)
2
sample covariance
s2&=&Σn
i=1&x2
i&-&n×2
n-1
sxy&=&Σn
i=1&xi&yi&-&n×y2
n-1
-BOX-PLOT
1. Median
→ n/2 or n · 0.5
2. First-third quartile
→ 25th p. = Q1 = n · 0.25
→ 75th p. = Q3 = n · 0.75
3. IQR
→ IQR = 75th p. - 25th p.
4. Whiskers
→ LW = 25th p. - 1.5 · IQR
→ UW = 75th p. + 1.5 · IQR
↙ ↘
↙ ↘↙ ↘
↙ ↘
↙ ↘
↓
variability index
n - 1
2
+1
n
2
+1
n
2
-1
out
Othello
pf3
pf4

Anteprima parziale del testo

Scarica Formulario di Statistica (statistics) e più Formulari in PDF di Statistica solo su Docsity!

DESCRIPTIVE STATISTICS

DEFINITION

  • Population : Total collection of all the elements that we are interested in
  • Statistical units : Single elements of the population
  • Variable : Features or characteristics of statistical units
  • Sample : Subgroup of the population that we are able to study in detail

CLASSES

  • Pairs of values that have some relationship to each other → (x, y)

→ x qualitative and y quantitative → distinct histograms, one for each category of x

→ x and y quantitative → scatter plot (↗ positive | ↘ negative correlation)

  • GROUPED DATA : Classes interval use : [ ; ) → “having n 1 to n 2 means that n 2 - n 1 is the interval”

→ Take the mid value in order to compute the sample mean [n = mid-value = average of the extremes]

SAMPLE STATISTICS

VARIABLES TYPE

Quantitative (numerical) Qualitative (categorical)

continuous

(weight, height, age)

discrete

(number of)

ordinal

(disag., neut., ag.)

nominal

(alive or dead)

mean yes no no

median yes yes no

mode yes yes yes

graph line graph, bar plot, frequency polygon bar chart (abs. or rel. f.) or pie chart (rel. f.)

SYMMETRY

FREQUENCY

x 0 is symmetric :

frequencies x 0 - c = x 0 + c for any c

mode = mx = ×

Frequency :

f = n · w

Relative frequency :

w =

f

n

CENTRALITY MEASURES

VARIATION - SPREAD

SAMPLE MEAN

SAMPLE MEDIAN SAMPLE MODE SAMPLE VARIANCE STANDARD DEVIATION

the data value that

occurs most

frequently

POPULATION

× → μ

s

2 → σ

2

P

^ → p

MEAN - MEDIAN RELATIONSHIP CORRELATION

symmetric

× = mx

right-skewed

× > mx

lef-skewed

× < mx

weighted mean

× =

Σ

N

i=

x i

n

=

(x 1

  • ... + x n )

n

× =

Σ

k

i=

f i

x i

n

= Σ

k

i=

w i

x i

SAMPLE RANGE

maximum - minimum

larger range → l. var.

s = s

r =

s xy

s x · s y

=

Σ x i

y i

  • n · × y

(Σ x

2

i

  • n · ×

2 ) · (Σ y i

2 - n · y

2 )

  1. Order from

smallest to larger

→ n odd : x

n/2 +

→ n even :

x n/

  • x n/2(+1)

sample covariance

s

n

i=

x

i

  • n×

n-

s xy =

Σ

n

i=

x i

y i

  • n×y

2

n-

BOX-PLOT

  1. Median

→ n/2 or n · 0.

  1. First-third quartile

th p. = Q 1 = n · 0.

th p. = Q 3 = n · 0.

3. IQR

→ IQR = 75

th p. - 25

th p.

  1. Whiskers

→ LW = 25

th p. - 1.5 · IQR

→ UW = 75

th p. + 1.5 · IQR

↙ (^) ↘

↙ ↘ ↙ ↘

↙ ↘

↙ ↓ ↘

variability index

n - 1 2

n 2

n 2

out Othello

PROBABILITY THEORY

SAMPLE PERCENTILES

LINEAR TRANSFORMATIONS

NORMAL DATA

  • Data set normal if histogram has :

→ Highest at the middle interval

(mode = sample mean = median)

→ Bell-shaped

→ Symmetry in middle interval

RANDOM VARIABLES

Support Sx : set of possible values which X can take

DISCRETE RANDOM VARIABLES : take only integer values CONTINUOUS RANDOM VARIABLES : real (decimal) values

→ Probability (discrete r.v) function

→ Pr(X = x,Y = y) = Pr(X = x)·Pr(Y = y)

→ Density (continuous r.v) function

→ f

X,Y(x,y) = fX(x) · fY(y)

PROPERTIES E(·) and Var(·)

  • X r.v. | a, b real | b ≠ 0

→ E(aX + b) = aE(X) + b | Var(aX + b) = a

2

Var(X)

→ E(X ± Y) = E(X) ± E(Y)

  • X, Y r.v. and X independent from Y

→ Var(X ± Y) = Var(X) + Var(Y)

NORMAL DISTRIBUTION Z-score

< [φ(a) found in table] >

Pr(Z < a) = 2

o table. Pr(Z > a) = 1

o table

Pr(Z < -a) = 1

o table Pr(Z > -a) = 2

o table

Pr(Z≤-a) = 1-Pr(Z≤a) = Pr(Z≥a)

Pr(a < Z < b) = P(Z < b) - P(Z < a)

Pr(-a < Z < b) = P(Z < b) - P(Z < -a)

Pr(-a < Z < -b) = P(Z < -b) - P(Z < -a)

SAMPLING DISTRIBUTION

NORMAL R.V. [X ~ N (μx, σ²)]

if X ~ N (μx, σ²) then Z = ~ N(0, 1)

  • (^) if Z ~ N (0, 1) then X = σZ + μ ~ N(μ, σ 2 )

CHI-SQUARE R.V [X ~ X

2 n]

  • (^) Z ~ N(0, 1) r.v. then Z 2 ~ X

2 1

- Z

2 chi-square r.v. : 1 degree of freedom (d.f)

→ ~ | E(X) = n | Var(X) = 2n [with n d.f.]

w/ proportions BINOMIAL R.V [X ~ Bin(n, p)]

Pr(T=a) = (integer values)

→ E(X) = n · p | Var(X) = n · p(1 - p) | SD = √Var(X)

w/ proportions BERNOULLI R.V. [X ~ Bern.(p)]

  • Independent and identical distributed r.v.

→ E(X) = p | Var(X) = p(1 - p) | SD = √Var(X)

X - μ

σ

X = ∑

n

i=

Z

2

i

X

2

n

∑ (

n

a )

p a (1 - p)

n-a

PROPERTIES ¯

  1. E(¯) = μ
  2. Var(¯) =

3. SD(¯) =

As n grows → 0

σ²

n

σ

n

SAMPLE MEAN

× possible outcome of ¯

SAMPLE VARIANCE

S

2

s

2 possible outcome of S

2

≈ CHI-square (d.f. n-1)

big d.f (large n) → no distr

∑

n

i=

X i

n

=

X 1

  • ... +X n

n

∑

n

i=

(X i

  • ¯)²

n-

→ CENTRAL LIMIT THEOREM

  • n large; all distribution

→ ¯ ~ N(nμ, nσ

2

) or

¯ ~ N(μ, )

Z = ~ N(0, 1)

↑ steps before ↑

* lowest z(0.25) inside

formula instead of Z

solve for x(0.25)

σ²

n

σ/√n

CLT conditions

  1. Interdependence
  2. More skewed : larger n
  3. ≈ symmetric : n > 30
  4. μ and σ

2 exist

← see step before

Pr(¯ < a) =

  • = Pr( < )
  • = Pr(Z < result)
  • = Z-table.

¯ - μ

σ/√n

a - μ

σ/√n

SASSARI

HYPOTHESES TESTING

ONLY ONE SAMPLE

NORMAL DATA : σ known NORMAL DATA : σ unknown BERNOULLI/BINOMIAL

HIPOTESIS H 0 : μ = μ 0 vs. H 1 : μ ... μ 0

TEST STATISTIC

OBSERVED STATISTICS

CRITICAL REGION [H 1 ...]

  • [<]

(-∞; zα)

[≠]

(-∞;-z1-α/2)V(z1-α/2;+∞)

[>]

(z1-α; +∞)

  • P-VALUE
  • [<]

Pr(Z < z

obs

| H 0 )

[≠]

2min{Pr(Zz

obs

|H 0 )}

  • [>]

Pr(Z > z

obs

| H 0 )

TWO SAMPLES

NORMAL DATA : σ known N. DATA : σ un. (n; m large) N. DATA : σ un. (n; m small)

HIPOTESIS H 0 : μdiff = μX - μy = d 0 VS. H1 : μdiff ... d 0

TEST STATISTIC

OBSERVED STATISTICS

CRITICAL REGION [μdiff ... d 0 ]

[<]

(-∞; zα)

[>]

(z1-α; +∞)

  • [≠]

(-∞;-z1-α/2)V(z1-α/2;+∞)

  • P-VALUE

[<]

Pr(Z < z

obs

| H 0 )

[>]

Pr(Z > z

obs

| H 0 )

  • [≠]

2min{Pr(Zz

obs

|H 0 )}

DECISION :

z

OBS

€ CR → reject Ho

Z

OBS € CR → fail to reject Ho

p-value < α → reject H 0

p-value > α → fail to reject

DECISION

z

OBS

€ CR → reject Ho

Z

OBS € CR → fail to reject Ho

p-value < α → reject H 0

p-value > α → fail to reject

DECISION :

t

OBS € CR → reject Ho

t

OBS € CR → fail to reject Ho

p-value < α → reject H 0

p-value > α → fail to reject

NORMAL PAIRED DATA

H0 : μdiff = μ 1 - μ 2 OR μ 2 - μ 1 = d 0 VS. H 1 : μdiff ... d 0

BERNOULLI/BINOMIAL

H0 : pdiff = pX - pY = d 0 VS. H 1 : pdiff ... p 0

DECISION :

t

OBS € CR → reject Ho

t

OBS € CR → fail to reject Ho

p-value < α → reject H 0

p-value > α → fail to reject

DECISION :

z

OBS

€ CR → reject Ho

Z

OBS € CR → fail to reject Ho

p-value < α → reject H 0

p-value > α → fail to reject

DECISION :

z

OBS € CR → reject Ho

z

OBS € CR → fail to reject Ho

p-value < α → reject H 0

p-value > α → fail to reject

Z =

Z

OBS

σ/√n

×

n

  • μ

σ/√n

DECISION :

t

OBS € CR → reject Ho

t

OBS € CR → fail to reject Ho

p-value < α → reject H 0

p-value > α → fail to reject

DECISION :

z

OBS

€ CR → reject Ho

Z

OBS € CR → fail to reject Ho

p-value < α → reject H 0

p-value > α → fail to reject

Z =

z

OBS

P - p

√p

(1-p

)/n

p

n

  • p

√p

(1-p

)/n

Z =

Z

obs

( X − Y ) − d 0

σ 2 X

n

σ 2 Y

m

( x − y ) − d 0

σ 2 x

n

σ 2 y

m

Z =

z

obs

( ̂ P x − ̂ P y ) − d 0

̂ P ( 1 − ̂ P )(

1

n

1

m

)

( p ̂ x − p ̂ y ) − d 0

p (̂ 1 − p ̂)(

1

n

1

m

)

T = ~ Tn-

t

obs

( D ) − d 0

S d / n

( d ) − d 0

s d / n

T = ~ Tn+m-

t

OBS

( X − Y ) − d 0

S

2 P

(

1

n

1

m

)

( x − y ) − d 0

s 2 P

(

1

n

1

m

)

Z =

Z

obs

( X − Y ) − d 0

σ 2 X

n

σ 2 Y

m

( x − y ) − d 0

σ 2 x

n

σ 2 y

m

T = ~ Tn-

t

OBS

S

x

/√n

×

n

  • μ

s

n

/√n

↓ ↓^ ↓

significance level = α = 0.

s s

  • 1-α )

~ N(0,1)

~ N(0,1)

~ N(0,1) ~ N(0,1)

tn+m-2;1-α

tn+m-2;α

tn+m-2;1-α/

tn-1;1-α/

tn-1;α^ -^ tn-1;1-α

tn-1;1-α

  • 1-α )

hypothesis test to determine : H 1

μ

/ I

μ