Download Chi2 - BiometriaBSC

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Biometria I.
SANB_BI1019
Pearson-féle Chi-négyzet
(χ2) teszt
Molnár Péter
Állattani Tanszék
[email protected]
2. Van-e összefüggés a iskolában eltöltött évek
száma (ed) és a családi jövedelem (Income) között
Problémák:
• Korreláció :
Feltesszük, hogy a
kapcsolat lineáris
(egyenes illesztés
hibája)
Column 1 Column 2
1
0.096344
1
Column 1
Column 2
200
150
100
50
0
0
-50
1
2
3
4
5
6
Problémák
Alternatív kérdésfelvetés:
Az iskolában eltöltött időnek van-e
szignifikáns hatása a későbbi fizetésre?
Student’s t-test???
- Több csoportot kell összehasonlítani 
ANOVA (Variancia Analízis)
- Nem normális az eloszlás  Nem
parametrikus módszerek
ANOVA
Anova: Single Factor
SUMMARY
Groups
Column 1
Column 2
Column 3
Column 4
Column 5
Count
1390
1936
1360
1355
359
ANOVA
Source of Variation
Between Groups
Within Groups
SS
376079.6991
39276042.25
Total
39652121.95
Sum
83214
128177
95383
106571
31294
df
4
6395
Average
59.86618705
66.2071281
70.13455882
78.6501845
87.16991643
Variance
3757.734421
5289.058368
6567.283573
8626.236475
8987.035294
MS
94019.92478
6141.679789
F
15.30850321
P-value
F crit
1.82967E-12 2.373319
6399
•Alkalmazási feltételek
•A függő változó magas mérési szintű (legalább intervallum szintű)
•Normál eloszlás (vagy legalább szimmetrikus)
•A vizsgált csoportokban az elemszám közel azonos,
•A függő változó szórása azonos, vagy legalább, a szórás nem
korrelál a csoportátlaggal
Pearson-féle Chi-négyzet (χ2) teszt
• Matematikai modell jóságának a vizsgálata
• Adatok függetlenségének tesztelésére
• Feltételek: elegendő elemszám
Ha az Xi –k független, normális eloszlásu független változók 0 átlaggal és 1 szórással, akkor
a belőlük képzett valószínüségi változó
A chi-négyzet eloszlást követi k szabadsági fokkal.
Matematikai modell jóságának a
vizsgálata
n lehetséges kimenetel
Oi=megfigyelt
Ei=számított
n-1=szabadsági fok
For example, to test the hypothesis that a random sample of 100 people has been drawn
from a population in which men and women are equal in frequency, the observed
number of men and women would be compared to the theoretical frequencies of 50 men
and 50 women. If there were 45 men in the sample and 55 women, then
If the null hypothesis is true (i.e., men and women are chosen with equal probability in
the sample), the test statistic will be drawn from a chi-square distribution with one
degree of freedom. Though one might expect two degrees of freedom (one each for the
men and women), we must take into account that the total number of men and women is
constrained (100), and thus there is only one degree of freedom (2 − 1). Alternatively, if
the male count is known the female count is determined, and vice-versa.
Consultation of the chi-square distribution for 1 degree of freedom shows that the
probability of observing this difference (or a more extreme difference than this) if men
and women are equally numerous in the population is approximately 0.3. This
probability is higher than conventional criteria for statistical significance (.001-.05), so
normally we would not reject the null hypothesis that the number of men in the
population is the same as the number of women (i.e. we would consider our sample
within the range of what we'd expect for a 50/50 male/female ratio.)
Függetlenség tesztelés
Szabadságfok: (r − 1)(c − 1)
In statistics, contingency tables are used to record and
analyse the relationship between two or more variables,
most usually categorical variables.
Suppose that we have two variables, sex (male or female)
and handedness (right- or left-handed). We observe
the values of both variables in a random sample of 100
people. Then a contingency table can be used to express
the relationship between these two variables, as follows:
Male
female
TOTAL
right-handed
43
44
87
left-handed
9
4
13
TOTAL
52
48
100
The figures in the right-hand column and the bottom row are
called marginal totals and the figure in the bottom
right-hand corner is the grand total.
Related documents