banner



For Males, Is Having Brown Eyes Independent Of Hair Color, Why Or Why Not?

Background

The hair and middle color as well as gender was recorded for 592 statistics students from the University of Deleware.

Questions & Hypotheses

There are a few unlike questions that could be asked to these data. To show several examples of how a chi-squared examination could exist implemented, each of the post-obit three questions will be answered with a split chi-squared test. Any one of these questions would be sufficient for a unmarried analysis.

Is hair color associated with center colour regardless of gender?

\[ H_{01}:\ \text{Hair color and eye color are not associated.} \] \[ H_{a1}:\ \text{Hair color and eye colour are associated.} \]

Is pilus color associated with gender?

\[ H_{02}:\ \text{Hair color and gender are not associated.} \] \[ H_{a2}:\ \text{Hair colour and gender are associated.} \]

Is eye color associated with gender?

\[ H_{03}:\ \text{Eye color and gender are not associated.} \] \[ H_{a3}:\ \text{Middle color and gender are associated.} \]

Data Analysis

            # Test H_{01}: HEC1 <- HairEyeColor[,,"Male"] + HairEyeColor[,,"Female"] chi.HEC1 <- chisq.test(HEC1) chi.HEC1          
            ##  ##  Pearson's Chi-squared test ##  ## information:  HEC1 ## X-squared = 138.3, df = ix, p-value < 2.2e-16          
            chi.HEC1$expected > 5          
            ##        Center ## Hair    Dark-brown Blue Hazel Light-green ##   Blackness  TRUE TRUE  True  TRUE ##   Chocolate-brown  TRUE True  Truthful  Truthful ##   Red    True True  TRUE  TRUE ##   Blond  TRUE True  TRUE  Truthful          

All expected counts are greater than 5, and so the requirements are met. (If this failed, it will nonetheless exist appropriate as long equally all expected counts are at least i and the average expected count is at least 5.)



            # Test H_{02}: MH <- apply(HairEyeColor[,,"Male person"],ane,sum) FH <- apply(HairEyeColor[,,"Female"],1,sum) HEC2 <- cbind(MH,FH) chi.HEC2 <- chisq.test(HEC2) chi.HEC2                      
            ##  ##  Pearson'due south Chi-squared examination ##  ## data:  HEC2 ## X-squared = seven.994, df = three, p-value = 0.04613          
            chi.HEC2$expected > 5          
            ##         MH   FH ## Black Truthful Truthful ## Brown True TRUE ## Red   Truthful TRUE ## Blond TRUE Truthful          

All expected counts are greater than 5, so the requirements are met.



            # Examination H_{03}: ME <- apply(HairEyeColor[,,"Male person"],2,sum) Fe <- apply(HairEyeColor[,,"Female person"],2,sum) HEC3 <- cbind(ME,Iron) chi.HEC3 <- chisq.test(HEC3) chi.HEC3                      
            ##  ##  Pearson'south Chi-squared test ##  ## data:  HEC3 ## 10-squared = one.53, df = iii, p-value = 0.6754          
            chi.HEC3$expected > five          
            ##         ME   Iron ## Brown True Truthful ## Blue  True TRUE ## Hazel TRUE Truthful ## Green TRUE Truthful          

All expected counts are greater than five, so the requirements are met.

Graphics

            barplot(HEC1, beside=Truthful, legend.text=TRUE, xlab="Eye Colour", main="Eye Colour vs. Pilus Color")          

plot of chunk unnamed-chunk-4

The Chi-squared test higher up showed a significant human relationship exists between Pilus Color and Middle Color \((p<0.0001)\). This is seen in the in a higher place plot by noting that the design of heights on the bars is changed across the different colors of hair. For Brown optics, the nearly common hair colour is brownish, followed past black, and so red, and so blond. For Bluish optics, the about common pilus colour is blond, then brown with black and red being much more rare. For Hazel eyes, well-nigh people also seem to have brown hair with black, then red, then blond ranking as much less common. People with light-green eyes also have dark-brown pilus as the most common result, with blond, red, and black following behind. If at that place was no relationship between pilus colour and heart color, then the pattern of hair colour would have remained much the same across the levels of eye color.

            barplot(HEC2, beside=True, legend.text=TRUE, xlab="Gender", main="Gender vs. Hair Color",         names.arg=c("Male person","Female"))          

plot of chunk unnamed-chunk-5

The relationship betwixt Gender and Hair Color is stated to be significant co-ordinate to the chi-squared test \((p=0.04613)\). Equally tin can exist seen in the above plot, the pattern of chocolate-brown hair being the most common and red pilus beingness the least common is consistent across both genders. However, the reversal of the blueprint is seen in that for males, black hair is more common than blond while for women, blond hair is more than mutual than black.

            barplot(HEC3, abreast=Truthful, legend.text=Truthful, xlab="Gender", main="Gender vs. Eye Color",         names.arg=c("Male","Female"))          

plot of chunk unnamed-chunk-6

That there is no human relationship betwixt Gender and Eye Colour \((p=0.6754)\) is seen by the fact that the general design of eye color is relatively consistent across genders. Dark-brown and blue are the most common colors and hazel and green are the least common. While the sample showed some evidence that possibly brown is more common than blue in women and blue is more common than brownish in males, at that place is insufficient testify to brand such a determination about the population. Thus we conclude that heart color is not associated with gender. Information technology is interesting to annotation that these plots exercise support the conclusion that brown eyes and blueish eyes are much more than common that hazel and green in the general population.

Interpretation

(Run into captions beneath each plot.)

Notation

If all 3 tests were actually performed simultaneously on the same data, then only the first examination would be considered significant because each test would need to exist tested at the \(\blastoff=0.05/3 \approx 0.0167\) level to account for the multiplicity of tests. The three tests performed here were simply to give 3 dissimilar examples in a concise mode.

For Males, Is Having Brown Eyes Independent Of Hair Color, Why Or Why Not?,

Source: https://byuistats.github.io/Statistics-Notebook/Analyses/Chi%20Squared%20Tests/Examples/HairEyeColorChiSquaredTest.html

Posted by: stevensprou1983.blogspot.com

0 Response to "For Males, Is Having Brown Eyes Independent Of Hair Color, Why Or Why Not?"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel