13
Biometria I. SANB_BI1019 Pearson-féle Chi- négyzet (χ2) teszt Molnár Péter Állattani Tanszék [email protected]

Biometria I. SANB_BI1019

Embed Size (px)

DESCRIPTION

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: - PowerPoint PPT Presentation

Citation preview

Page 1: Biometria I. SANB_BI1019

Biometria I.SANB_BI1019

Pearson-féle Chi-négyzet (χ2) teszt

Molnár Péter

Állattani Tanszék

[email protected]

Page 2: Biometria I. SANB_BI1019

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 2Column 1 1Column 2 0.096344 1

-50

0

50

100

150

200

0 1 2 3 4 5 6

Page 3: Biometria I. SANB_BI1019

ProblémákAlternatí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

Page 4: Biometria I. SANB_BI1019

ANOVAAnova: Single Factor

SUMMARYGroups Count Sum Average Variance

Column 1 1390 83214 59.86618705 3757.734421Column 2 1936 128177 66.2071281 5289.058368Column 3 1360 95383 70.13455882 6567.283573Column 4 1355 106571 78.6501845 8626.236475Column 5 359 31294 87.16991643 8987.035294

ANOVASource of Variation SS df MS F P-value F critBetween Groups 376079.6991 4 94019.92478 15.30850321 1.82967E-12 2.373319Within Groups 39276042.25 6395 6141.679789

Total 39652121.95 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

Page 5: Biometria I. SANB_BI1019

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

Page 6: Biometria I. SANB_BI1019

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.

        

Page 7: Biometria I. SANB_BI1019

Matematikai modell jóságának a vizsgálata

n lehetséges kimenetel

Oi=megfigyelt

Ei=számított

n-1=szabadsági fok

Page 8: Biometria I. SANB_BI1019

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.)

Page 9: Biometria I. SANB_BI1019

Függetlenség tesztelés

Szabadságfok: (r − 1)(c − 1)

Page 10: Biometria I. SANB_BI1019

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 observethe values of both variables in a random sample of 100 people. Then a contingency table can be used to expressthe relationship between these two variables, as follows:

right-handed left-handed TOTALMale 43 9 52female 44 4 48TOTAL 87 13 100

The figures in the right-hand column and the bottom row are called marginal totals and the figure in the bottomright-hand corner is the grand total.

Page 11: Biometria I. SANB_BI1019
Page 12: Biometria I. SANB_BI1019
Page 13: Biometria I. SANB_BI1019