Return-Path: william@bourbon.usc.edu
Delivery-Date: Sun Feb 19 16:39:29 2006
Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75])
by merlot.usc.edu (8.13.1/8.13.1) with ESMTP id k1K0dTgd018969
for ; Sun, 19 Feb 2006 16:39:29 -0800
Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1])
by bourbon.usc.edu (8.13.1/8.13.1) with ESMTP id k1K0bIWV024272
for ; Sun, 19 Feb 2006 16:37:18 -0800
Message-Id: <200602200037.k1K0bIWV024272@bourbon.usc.edu>
To: csac@merlot.usc.edu
Subject: Re: CS599 - Hw2
Date: Sun, 19 Feb 2006 16:37:18 -0800
From: william@bourbon.usc.edu
Someone wrote:
> For some values of X1 and X2 I am getting the right value of n1,
> n0 (for X1) and n00,n10,n01,n11 (for X2) but the wrong precision
> value of X1 and X2.
>
> For X1 i am using the equation,
>
> x1= ((float)((count0 - count1)*(count0 -
> count1)))/(float)(count*8);
> printf( "x1 = %f\n",x1);
>
> where, count0,count1and count are int and x1 is float
>
> < x1 = 3.500695
> ---
> > x1 = 3.500694
>
> < x1 = 23247.003906
> ---
> > x1 = 23247.004414
>
> < x1 = 20718.941406
> ---
> > x1 = 20718.941719
>
>
> Similarly for X2,
>
> < x2 = 1.724609
> ---
> > x2 = 1.725610
>
> < x2 = 0.967773
> ---
> > x2 = 0.967726
Looks to me like all these values are close enough! This is
why item (5) in the grading guidelines says:
The only values that are allowed to be different are the
"integer values" and "real values"
As I've mentioned in class, I do not expect all the X values
will be identical to the "solution". As long as they are
close, it's good enough. This is because people may use a
different way to calculate these statistics.
--
Bill Cheng // bill.cheng@usc.edu