1 2 Previous Next 16 Replies Latest reply on Nov 6, 2013 8:00 PM by Ramon Martinez

# is possible base on my data and get chi-square result？

Hi guys, Tableau is possible to use chi-square method to do this type of result?

base on my data?

Ramon Martinez

• ###### 1. Re: is possible base on my data and get chi-square result？

HI Cunny,

I suggest you to read this thread: Using table calculation to calculate chi-squared where Scott Tennican provides a solution and a sample workbook with implementation of chi-squared in contingency table.

Best

Ramon

• ###### 2. Re: is possible base on my data and get chi-square result？

Hi Ramon,

i know that post, but i don't understand their working, and i follow their formula what does the output for?

thanks

canny

• ###### 3. Re: is possible base on my data and get chi-square result？

Hi Canny,

The sheet TwoCategoricals in the workbook chiSquaredMultiPopTest.twbx created by Scott Tennican shows a Two-Way Table (or cross tab) that counts the number of subjects (in this specific case is the number of sales) by Product Category and Region, including marginal counts that you can see in column and rows grand totals.

When you hover the mouse over every cell of the table, the tooltip shows the Counts of Sales, Count of sales Expected and the value of Chi-Squared that is 12.25

Now we need to determine the degree of freedom for the Two-Way Table using the formula

df=(number of rows - 1)*(number of column - 1)

In this specific table df=6

Having Chi-Squared=12.25 and df=6 we need to go to the Chi-Squared distribution table to determine the probability or P-value P(Chi-Squared >= 12.25) for chi-squared distribution with 6 degree of freedom

P-value is 0.056

As p-values is higher that 0.01, we can concludes that there is no evidence of association among Sales by Region and the factor Categories of Products.

There is a drawback in the solution: the degree of freedom and the p-value is not calculated, so you need to calculate df by yourself and find the p-value in a Chi-Squared distribution table.

The web page "Calculation for the Chi-Squared Test" provides an online tool to calculate chi-squared, df and p-value

References

I hope this helps you to understand the output of the two-way table and chi-squared test.

Best,

Ramon

1 of 1 people found this helpful
• ###### 4. Re: is possible base on my data and get chi-square result？

This video can help to understand Chi-Squared Test

Best,

Ramon

• ###### 5. Re: is possible base on my data and get chi-square result？

Hi Ramon,

how you know P value is 0.056 and df=6?

thanks

canny

• ###### 6. Re: is possible base on my data and get chi-square result？

Hi Canny

To calculate df count the number of rows and number of columns in the two-way table and use formula bellow

Df=(rows-1)*(columns-1)

Go to chi-square distribution table and find the critical value of chi-squared based on df and 95% confidence.

If your calculated chi-squared is lower than the critical value, reject the null hypothesis.

I fond the p-value in the online tool I've mentioned in my previous comment.

Ramon

• ###### 7. Re: is possible base on my data and get chi-square result？

Hi Canny,

Have you done any progress in understanding the Tow-way Table and Chi-squared test?

Let me know if you require additional support.

Regards,

Ramon

• ###### 8. Re: is possible base on my data and get chi-square result？

Hi Ramon，

i understand the Chi-squared test. but i still cannot get the similar result like beginning i post that picture.

Thanks

canny

• ###### 9. Re: is possible base on my data and get chi-square result？

Hi Canny,

Could your explain better what you need to accomplish? It is also appreciated if you explain the content of the screenshot you you included in your first post.

It seems it represents a kind of Two-way table but I don't see any result on it.

Best,

Ramon

• ###### 10. Re: is possible base on my data and get chi-square result？

Hi Ramon, this is the result from other chi-square method. i expect that i can use tableau get similar result as this base to my data file.  this is like a model that can base on some data calculate the result where they post to.

thanks

canny

• ###### 11. Re: is possible base on my data and get chi-square result？

Hi Cunny,

What is the software that produce that results. To tell you the truth, I don't see any Chi-Square result in the screenshot you have provided.

Ramon

• ###### 12. Re: is possible base on my data and get chi-square result？

Hi Ramon,

i use SPSS modeler ,there also did not show me the working(but i know that is using chi-square), is a device that can automatic calculate the result.

thanks

canny

• ###### 13. Re: is possible base on my data and get chi-square result？

HI Canny,

I don't have access to SPSS as I'm not in my office right now. I can check tomorrow in the morning.

But to tell you the truth any Chi-Squared method has to provide the following elements:

1.- Two-way table with counting by cells and grand totals by columns and rows

2.- Chi-Square value

3.- Degree of freedom

4.- P-value

I don't see those elements in the results (screenshot) you got in SPSS

Best,

Ramon

• ###### 14. Re: is possible base on my data and get chi-square result？

Hi Canny,

I applied Chi-squared to a data set using SPSS and this is the output. I used SPSS ver 17.

First you are able to see the Two-way table crossing to dimensions: Know to read and write vs. ***. Bellow the two-way table are the summary statistics: Pearson Chi-Squate, df and P-value I hope this help.

Regards,

Ramon

1 2 Previous Next