gresty
asked on
Excel Chi ^2 function
Is there a Chi^2 function in Excel or some vb code I could use to pass in the significance level (alpha) and the critical value (chi_alpha) and return the degree of freedom?
There is a ChiDist function which returns the one-tailed probability of the chi squared distribution
Got to Insert, Function, and choose Statistical for the category, and it will be in the list
Note: You may have to enable to Analysis Toolpak add-in to have this function listed. If so go to Tools, Add-ins, and check off Analysis Toolpak.
Got to Insert, Function, and choose Statistical for the category, and it will be in the list
Note: You may have to enable to Analysis Toolpak add-in to have this function listed. If so go to Tools, Add-ins, and check off Analysis Toolpak.
I can't find any references to either of them. If you tell me exactly how it is calculated, I'll write a function for you.
Alternatively, search the net for 'mathematic function add - ins'
or something
Thanks
Jell
Alternatively, search the net for 'mathematic function add - ins'
or something
Thanks
Jell
The arguments are as follows
CHIDIST(x,degrees_freedom)
X is the value at which you want to evaluate the distribution.
Degrees_freedom is the number of degrees of freedom.
CHIDIST(x,degrees_freedom)
X is the value at which you want to evaluate the distribution.
Degrees_freedom is the number of degrees of freedom.
Also, just found
>Chidist
>Chiinv
>Chitest
Thanks
James
>Chidist
>Chiinv
>Chitest
Thanks
James
In addition there are also these functions which may help
CHIINV(probability,degrees _freedom)
Probability is a probability associated with the chi-squared distribution.
Degrees_freedom is the number of degrees of freedom.
CHITEST(actual_range,expec ted_range)
Actual_range is the range of data that contains observations to test against expected values.
Expected_range is the range of data that contains the ratio of the product of row totals and column totals to the grand total.
CHIINV(probability,degrees
Probability is a probability associated with the chi-squared distribution.
Degrees_freedom is the number of degrees of freedom.
CHITEST(actual_range,expec
Actual_range is the range of data that contains observations to test against expected values.
Expected_range is the range of data that contains the ratio of the product of row totals and column totals to the grand total.
ASKER
OK let me try and explain a little clearer what I am after.
With Chi squared there are 3 parameters:
Degrees of freedom
Probability
Critical Value
There are 2 built in functions in excel.
CHIINV(probability,degrees _freedom)
This function takes in the probability and the degrees of freedom and returns the critical value
CHIDIST(x,deg_freedom)
This function takes in the critical value and the degrees of freedom and returns the probability
What I am looking for is a function that takes in the critical value and the probability and returns the degrees of freedom.
Is this possible?
With Chi squared there are 3 parameters:
Degrees of freedom
Probability
Critical Value
There are 2 built in functions in excel.
CHIINV(probability,degrees
This function takes in the probability and the degrees of freedom and returns the critical value
CHIDIST(x,deg_freedom)
This function takes in the critical value and the degrees of freedom and returns the probability
What I am looking for is a function that takes in the critical value and the probability and returns the degrees of freedom.
Is this possible?
ASKER
OK let me try and explain a little clearer what I am after.
With Chi squared there are 3 parameters:
Degrees of freedom
Probability
Critical Value
There are 2 built in functions in excel.
CHIINV(probability,degrees _freedom)
This function takes in the probability and the degrees of freedom and returns the critical value
CHIDIST(x,deg_freedom)
This function takes in the critical value and the degrees of freedom and returns the probability
What I am looking for is a function that takes in the critical value and the probability and returns the degrees of freedom.
Is this possible?
With Chi squared there are 3 parameters:
Degrees of freedom
Probability
Critical Value
There are 2 built in functions in excel.
CHIINV(probability,degrees
This function takes in the probability and the degrees of freedom and returns the critical value
CHIDIST(x,deg_freedom)
This function takes in the critical value and the degrees of freedom and returns the probability
What I am looking for is a function that takes in the critical value and the probability and returns the degrees of freedom.
Is this possible?
The answer must be no. Why should there be a unique degrees of freedom for an arbitrary pair of critical value and probability?
leo
leo
Hi gresty,
I can easily create a spreadsheet that will calculate that for you.
To how many degrees of freedom would you like to calculate? 30 is the usual arbitrary figure - due to the nature of the test - but I can make it calculate as high as you like.
Dave
I can easily create a spreadsheet that will calculate that for you.
To how many degrees of freedom would you like to calculate? 30 is the usual arbitrary figure - due to the nature of the test - but I can make it calculate as high as you like.
Dave
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks TigerMan,
This is exactly what I want.
I never thought of solving the problem using a look up list. I was trying to solve the problem using Excel vba.
This is exactly what I want.
I never thought of solving the problem using a look up list. I was trying to solve the problem using Excel vba.
Pleased to be of help.
Thanks,
Dave
Thanks,
Dave
What exactly are you looking for here?
Something like
5 to the power of 3
E.g. 5^3 or 5^2
If not what is CHI?
cheers,
Ed.