Skip site navigation (1)Skip section navigation (2)
Date:      Mon,  1 Jan 2001 17:44:17 +0100 (CET)
From:      tobez@tobez.org
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/23995: New port: math/p5-Statistics-ChiSquare (How random is your data?)
Message-ID:  <20010101164417.2947D54E7@heechee.tobez.org>
Resent-Message-ID: <200101011650.f01Go1B19628@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         23995
>Category:       ports
>Synopsis:       New port: math/p5-Statistics-ChiSquare (How random is your data?)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 01 08:50:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Anton Berezin
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
>Description:

Suppose you flip a coin 100 times, and it turns up heads 70 times.  Is
the coin fair?

Suppose you roll a die 100 times, and it shows 30 sixes.  Is the die
loaded?

In statistics, the chi-square test calculates "how random" a series of
numbers is.  But it doesn't simply say "yes" or "no".  Instead, it gives
you a confidence interval, which sets upper and lower bounds on the
likelihood that the variation in your data is due to chance.  See the
examples below. 

There's just one function in this module: chisquare().  Instead of
returning the bounds on the confidence interval in a tidy little
two-element array, it returns an English string.  This was a deliberate
design choice---many people misinterpret chi-square results, and the
string helps clarify the meaning. 

>How-To-Repeat:
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	p5-Statistics-ChiSquare
#	p5-Statistics-ChiSquare/pkg-plist
#	p5-Statistics-ChiSquare/pkg-descr
#	p5-Statistics-ChiSquare/pkg-comment
#	p5-Statistics-ChiSquare/distinfo
#	p5-Statistics-ChiSquare/Makefile
#
echo c - p5-Statistics-ChiSquare
mkdir -p p5-Statistics-ChiSquare > /dev/null 2>&1
echo x - p5-Statistics-ChiSquare/pkg-plist
sed 's/^X//' >p5-Statistics-ChiSquare/pkg-plist << 'END-of-p5-Statistics-ChiSquare/pkg-plist'
Xlib/perl5/site_perl/%%PERL_VER%%/auto/Statistics/ChiSquare/autosplit.ix
Xlib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Statistics/ChiSquare/.packlist
Xlib/perl5/site_perl/%%PERL_VER%%/Statistics/ChiSquare.pm
X@dirrm lib/perl5/site_perl/%%PERL_VER%%/auto/Statistics/ChiSquare
X@dirrm lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Statistics/ChiSquare
X@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/auto/Statistics 2>/dev/null || true
X@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Statistics 2>/dev/null || true
X@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/Statistics 2>/dev/null || true
END-of-p5-Statistics-ChiSquare/pkg-plist
echo x - p5-Statistics-ChiSquare/pkg-descr
sed 's/^X//' >p5-Statistics-ChiSquare/pkg-descr << 'END-of-p5-Statistics-ChiSquare/pkg-descr'
XSuppose you flip a coin 100 times, and it turns up heads 70 times.  Is
Xthe coin fair?
X
XSuppose you roll a die 100 times, and it shows 30 sixes.  Is the die
Xloaded?
X
XIn statistics, the chi-square test calculates "how random" a series of
Xnumbers is.  But it doesn't simply say "yes" or "no".  Instead, it gives
Xyou a confidence interval, which sets upper and lower bounds on the
Xlikelihood that the variation in your data is due to chance.  See the
Xexamples below. 
X
XThere's just one function in this module: chisquare().  Instead of
Xreturning the bounds on the confidence interval in a tidy little
Xtwo-element array, it returns an English string.  This was a deliberate
Xdesign choice---many people misinterpret chi-square results, and the
Xstring helps clarify the meaning. 
X
X-Anton
X<tobez@tobez.org>
END-of-p5-Statistics-ChiSquare/pkg-descr
echo x - p5-Statistics-ChiSquare/pkg-comment
sed 's/^X//' >p5-Statistics-ChiSquare/pkg-comment << 'END-of-p5-Statistics-ChiSquare/pkg-comment'
XHow random is your data?
END-of-p5-Statistics-ChiSquare/pkg-comment
echo x - p5-Statistics-ChiSquare/distinfo
sed 's/^X//' >p5-Statistics-ChiSquare/distinfo << 'END-of-p5-Statistics-ChiSquare/distinfo'
XMD5 (Statistics-ChiSquare-0.2.tar.gz) = 305b347334b342642f341e16d5324242
END-of-p5-Statistics-ChiSquare/distinfo
echo x - p5-Statistics-ChiSquare/Makefile
sed 's/^X//' >p5-Statistics-ChiSquare/Makefile << 'END-of-p5-Statistics-ChiSquare/Makefile'
X# New ports collection makefile for:	math/p5-Statistics-ChiSquare
X# Date created:				01 January 2001
X# Whom:					Anton Berezin <tobez@tobez.org>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	Statistics-ChiSquare
XPORTVERSION=	0.2
XCATEGORIES=	math perl5
XMASTER_SITES=	${MASTER_SITE_PERL_CPAN}
XMASTER_SITE_SUBDIR=	Statistics
XPKGNAMEPREFIX=	p5-
X
XMAINTAINER=	tobez@tobez.org
X
XUSE_PERL5=	yes
XPERL_CONFIGURE=	yes
X
XWRKSRC=		${WRKDIR}/Statistics/ChiSquare
X
XMAN3=		Statistics::ChiSquare.3
XMANPREFIX=	${PREFIX}/lib/perl5/${PERL_VERSION}
X
X.include <bsd.port.mk>
END-of-p5-Statistics-ChiSquare/Makefile
exit


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010101164417.2947D54E7>