Main Page | Report this Page
 
   
Science Forum Index  »  Statistics - Education Forum  »  questions about chi square and g test
Page 1 of 1    
Author Message
Guest
Posted: Tue Apr 15, 2008 8:28 am
Hi,
I am new to statistics. I got couple questions about chi square and g
independence test. For chi square test, how do I handle all zero
columns in cross tables? Should those columns be included in the
table? all zero columns will give zero expectation for cells in those
columns and cause divided by zero errors.. For g test, what to do if
some cells have zero observations? That will cause log of zero error.

Thanks.
Guest
Posted: Tue Apr 15, 2008 2:54 pm
On Apr 15, 7:33 pm, Richard Ulrich <Rich.Ulr...@comcast.net> wrote:
Quote:
On Tue, 15 Apr 2008 11:28:19 -0700 (PDT), ouyang....@gmail.com wrote:
Hi,
I am new to statistics. I got couple questions about chi square and g
independence test. For chi square test, how do I handle all zero
columns in cross tables? Should those columns be included in the
table? all zero columns will give zero expectation for cells in those
columns and cause divided by zero errors.. For g test, what to do if
some cells have zero observations? That will cause log of zero error.

For the ordinary contingency table, you drop
any rows or columns that total zero.

--
Rich Ulrich

http://www.pitt.edu/~wpilib/index.html

Thank you. How about zero cells in G test?
Richard Ulrich
Posted: Tue Apr 15, 2008 6:33 pm
Guest
On Tue, 15 Apr 2008 11:28:19 -0700 (PDT), ouyang.jie@gmail.com wrote:

Quote:
Hi,
I am new to statistics. I got couple questions about chi square and g
independence test. For chi square test, how do I handle all zero
columns in cross tables? Should those columns be included in the
table? all zero columns will give zero expectation for cells in those
columns and cause divided by zero errors.. For g test, what to do if
some cells have zero observations? That will cause log of zero error.


For the ordinary contingency table, you drop
any rows or columns that total zero.

--
Rich Ulrich

http://www.pitt.edu/~wpilib/index.html
Ryan
Posted: Wed Apr 16, 2008 1:54 am
Guest
On Apr 15, 8:54 pm, ouyang....@gmail.com wrote:
Quote:
On Apr 15, 7:33 pm, Richard Ulrich <Rich.Ulr...@comcast.net> wrote:





On Tue, 15 Apr 2008 11:28:19 -0700 (PDT), ouyang....@gmail.com wrote:
Hi,
I am new to statistics. I got couple questions about chi square and g
independence test. For chi square test, how do I handle all zero
columns in cross tables? Should those columns be included in the
table? all zero columns will give zero expectation for cells in those
columns and cause divided by zero errors.. For g test, what to do if
some cells have zero observations? That will cause log of zero error.

For the ordinary contingency table, you drop
any rows or columns that total zero.

--
Rich Ulrich

http://www.pitt.edu/~wpilib/index.html

Thank you. How about zero cells in G test?- Hide quoted text -

- Show quoted text -

Same issue b/c: G=2$B-t(B[O$B!_(Bln(O/E)]

The only option I can think of would be to drop the cells.

Ryan
Guest
Posted: Wed Apr 16, 2008 3:48 am
On Apr 16, 7:54 am, Ryan <Ryan.Andrew.Bl...@gmail.com> wrote:
Quote:
On Apr 15, 8:54 pm, ouyang....@gmail.com wrote:



On Apr 15, 7:33 pm, Richard Ulrich <Rich.Ulr...@comcast.net> wrote:

On Tue, 15 Apr 2008 11:28:19 -0700 (PDT), ouyang....@gmail.com wrote:
Hi,
I am new to statistics. I got couple questions about chi square and g
independence test. For chi square test, how do I handle all zero
columns in cross tables? Should those columns be included in the
table? all zero columns will give zero expectation for cells in those
columns and cause divided by zero errors.. For g test, what to do if
some cells have zero observations? That will cause log of zero error.

For the ordinary contingency table, you drop
any rows or columns that total zero.

--
Rich Ulrich

http://www.pitt.edu/~wpilib/index.html

Thank you. How about zero cells in G test?- Hide quoted text -

- Show quoted text -

Same issue b/c: G=2$B-t(B[O$B!_(Bln(O/E)]

The only option I can think of would be to drop the cells.

Ryan

Or put a very small # in the cells I guess.
Bruce Weaver
Posted: Wed Apr 16, 2008 4:50 am
Guest
On Apr 15, 8:54 pm, ouyang....@gmail.com wrote:
Quote:
On Apr 15, 7:33 pm, Richard Ulrich <Rich.Ulr...@comcast.net> wrote:

For the ordinary contingency table, you drop
any rows or columns that total zero.

--
Rich Ulrich

http://www.pitt.edu/~wpilib/index.html

Thank you. How about zero cells in G test?


The chi-square test is an approximate test. G (aka the likelihood
ratio chi-square) is just an alternative way of computing the test
statistic. So the same advice applies.

--
Bruce Weaver
bweaver@lakeheadu.ca
www.angelfire.com/wv/bwhomedir
"When all else fails, RTFM."
Ray Koopman
Posted: Wed Apr 16, 2008 8:01 am
Guest
On Apr 15, 5:54 pm, ouyang....@gmail.com wrote:
Quote:
On Apr 15, 7:33 pm, Richard Ulrich <Rich.Ulr...@comcast.net> wrote:
On Tue, 15 Apr 2008 11:28:19 -0700 (PDT), ouyang....@gmail.com wrote:
Hi,
I am new to statistics. I got couple questions about chi square and g
independence test. For chi square test, how do I handle all zero
columns in cross tables? Should those columns be included in the
table? all zero columns will give zero expectation for cells in those
columns and cause divided by zero errors.. For g test, what to do if
some cells have zero observations? That will cause log of zero error.

For the ordinary contingency table, you drop
any rows or columns that total zero.

--
Rich Ulrich

http://www.pitt.edu/~wpilib/index.html

Thank you. How about zero cells in G test?

Individual zero cells are no problem -- they give 0 mathematically,
with no special treatment necessary, because x log x -> 0 as x -> 0.
Think of it as (log x)/(1/x). Both log x and 1/x -> infinity as x ->
0, but 1/x gets bigger faster.
Guest
Posted: Wed Apr 16, 2008 2:26 pm
On Apr 16, 2:01 pm, Ray Koopman <koop...@sfu.ca> wrote:
Quote:
On Apr 15, 5:54 pm, ouyang....@gmail.com wrote:



On Apr 15, 7:33 pm, Richard Ulrich <Rich.Ulr...@comcast.net> wrote:
On Tue, 15 Apr 2008 11:28:19 -0700 (PDT), ouyang....@gmail.com wrote:
Hi,
I am new to statistics. I got couple questions about chi square and g
independence test. For chi square test, how do I handle all zero
columns in cross tables? Should those columns be included in the
table? all zero columns will give zero expectation for cells in those
columns and cause divided by zero errors.. For g test, what to do if
some cells have zero observations? That will cause log of zero error.

For the ordinary contingency table, you drop
any rows or columns that total zero.

--
Rich Ulrich

http://www.pitt.edu/~wpilib/index.html

Thank you. How about zero cells in G test?

Individual zero cells are no problem -- they give 0 mathematically,
with no special treatment necessary, because x log x -> 0 as x -> 0.
Think of it as (log x)/(1/x). Both log x and 1/x -> infinity as x -
0, but 1/x gets bigger faster.

Got it. Thanks.
Ryan
Posted: Thu Apr 17, 2008 4:24 am
Guest
On Apr 16, 2:01 pm, Ray Koopman <koop...@sfu.ca> wrote:
Quote:
On Apr 15, 5:54 pm, ouyang....@gmail.com wrote:





On Apr 15, 7:33 pm, Richard Ulrich <Rich.Ulr...@comcast.net> wrote:
On Tue, 15 Apr 2008 11:28:19 -0700 (PDT), ouyang....@gmail.com wrote:
Hi,
I am new to statistics. I got couple questions about chi square and g
independence test. For chi square test, how do I handle all zero
columns in cross tables? Should those columns be included in the
table? all zero columns will give zero expectation for cells in those
columns and cause divided by zero errors.. For g test, what to do if
some cells have zero observations? That will cause log of zero error.

For the ordinary contingency table, you drop
any rows or columns that total zero.

--
Rich Ulrich

http://www.pitt.edu/~wpilib/index.html

Thank you. How about zero cells in G test?

Individual zero cells are no problem -- they give 0 mathematically,
with no special treatment necessary, because x log x -> 0 as x -> 0.
Think of it as (log x)/(1/x). Both log x and 1/x -> infinity as x -
0, but 1/x gets bigger faster.- Hide quoted text -

- Show quoted text -

Makese sense. For xlog(x), x approaches 0 faster than log(x)
approaches negative infinity. Thanks for the correction with this
limit.
 
Page 1 of 1       All times are GMT - 5 Hours
The time now is Sun Oct 12, 2008 3:51 pm