# How to compute Chi-square value and degrees of freedom in Excel?

I am trying to understand the statistical test of the chi-square in Excel. I already made the test but I still don't know how to compute the χ² value and what it means, how to compute the degrees of freedom and how to write a propper APA approved result section. Can anyone help me and explain this in a simple way?

I have a population of n=76. 'Left' = 25 and 'Right' = 51. The hypothesis is you would expect a normal distribution ('Left' =38 and 'Right' = 38). So the question is 'is this distribution a coincidence?' The p < .029. By seeing this outcome I thought there is that is no coincidence that there isn't a normal distribution and it must be due to a variable.

Is it true in this case the degress of freedom is just n-1?

-

## 1 Answer

This is really more of a statistical question (except perhaps the bit about APA style). As such it probably belongs on stats.stackexchange.com .

A binary variable does not have a "normal distribution". A normal distribution is bell shaped and is relevant to continuous data.

Your null hypothesis is that the population proportions for left and right handers are equal. Thus, if your chi-square value is sufficiently large, then you might reject the null hypothesis and conclude that the population proportions are unequal.

If $k$ is the number of categories (you have two categories), then degrees of freedom for the one sample chi-square test is $k-1$ (i.e., $2-1 = 1$).

To calculate chi-square check out the example here.

The following formula in Excel should give you a p-value. For example if your chi-square value was 22, and your degrees of freedom was 3:

```` =1-CHISQ.DIST(22, 3,TRUE)
````
• the first argument is the chi-square value
• The second argument is the degrees of freedom
• The third argument indicates that a cumulative distribution (CDF) is desired
• Thus by taking 1 minus the value of the CDF you get the probability of getting a chi-square value as large or larger than the observed value.

You can check your formula by looking at existing calculated tables. http://home.comcast.net/~sharov/PopEcol/tables/chisq.html

-

Thank you very much Jeromy! This was very helpful! – NinaM Mar 11 at 12:32
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 3, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9295969009399414, "perplexity_flag": "middle"}