SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Zealot stikkybubble's Avatar
    Join Date
    Sep 2006
    Location
    Pluto
    Posts
    182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question statistical tables

    hi,
    I want to write my own statistics application with PHP and MySQL.
    I don't have to, I want to.
    I havn't started yet, but I was wondering if anyone knows if there are statistical tables online anywhere? Whether or not they can be integrated into the script (ie it would tell you straight away eg p-values) or just available via a hyperlink for you to do the lookup yourself?
    I only have a little experience so far, but I thought this would be a nice project to try as I have to do some statistics anyway....
    So far all my programs have worked
    Any thoughts?

  2. #2
    SitePoint Wizard bronze trophy Kailash Badu's Avatar
    Join Date
    Nov 2005
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What kind of statistical applications?

  3. #3
    SitePoint Zealot stikkybubble's Avatar
    Join Date
    Sep 2006
    Location
    Pluto
    Posts
    182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Think simple.
    Nothing too fancy- just analysis of data from a psychology experiment. Data in tables. Lots of correlation and regression. The exact stats may depend on the outcome, including the numbers of participants, the number of categories they can be put in... The experiment has not even begun- everything is in the planning stages.

    I am hoping to have a user-friendly interface where I select eg a column(s) by name and have a menu of functions to choose from. Then present the results in idiot-proof form. The idiot in question being me- nobody else will be using it.

    I know you are hoping for something more specific, sorry.
    You know the sort of tables I mean though? You find them at the back of any stats book.
    student's t-test, chi-squared, normal distribution and so on.
    Yes, it would be cool to write a program that worked out all of that stuff too... but I might get into deep waters mathematically. Or am I wrong? I thought people who did stats for web sites may know.

    Any place on the web that has some should have all...they travel in packs, like wolves.

  4. #4
    SitePoint Wizard Mike Borozdin's Avatar
    Join Date
    Oct 2002
    Location
    Edinburgh, UK
    Posts
    1,743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I guess you have to just put that data.

    Heh, I've jsut finished my statistics homework.

  5. #5
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Heres a few ideas forged from bitter experience mostly (they tend to be the most vivid)

    The data is coming out of a database, right?

    Make sure you work out a naming system for each variable.

    in Mysql in a table for stats you might have:
    p_name (meaning person_name).

    in your scripts you might have an input field to add/edit a persons name:

    <input type=text name=p_name value="" />

    In your page requests you might have a url driven query version.

    getStats.php?date=2007&order_by=p_name

    Now as you move from one lang to another, PHP, sql, regex, html, css this will help you keep a grip of what is supposed to do what and which variable it is relates to.

    person_name or p_name - it doesnt matter, the latter is less typing, it depends on how many other p's you have ...

    If I were you, I would tend to use the GET method on forms just so you can interrogate the data, and of course view the data in the browser window.

    Change it to POST later.

    Also, I would get a big piece of paper (like flip chart size) and draw little squares that represent "pages", link them up with arrows, use some highlighter pens, create pages for your admin, for your "public" pages etc etc.

    Imagine what the GET =style urls will look like, do you want to :

    sort and resort by variable? p_age descending? "oldest people first"
    constrict by date ? year=date('Y')-1; "only last year"

    start with "show newest entries" and work backwards to make sure you model your data correctly in the first place. Getting your dbase schemas right and normalized to the correct degree is the hardest thing to learn, you wont get it right first time. The key to it will be getting those ideas from the paper into sql - testing them and making sure they work.

    The rest is relatively easy.

  6. #6
    SitePoint Zealot stikkybubble's Avatar
    Join Date
    Sep 2006
    Location
    Pluto
    Posts
    182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the advice, I am sure it will be really helpful.
    Not the answer to the question that I asked, but the answer to the question I should have asked!
    lol
    thanks again

  7. #7
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Sorry - in hindsight looks like a bit off topic rant now, I must admit ....

    When you talked about stats, I immediately thought of a table class I found on phpclasses.org ( documentation in portugese - thats all I remember of it ).

    What was clever was that the table reordered the columns depending on whether the header or which row was clicked. It was all automatic.

    It was pretty neat, though the code style was pretty hard to work with - an of course the hints didnt help me much at all. Cant find it now of course.

    That idea though matched with some math classes sound interesting, I wish I had come across these 2 links a few weeks ago ... Pear: Math and PHPMath.com.
    Last edited by Cups; May 11, 2007 at 08:37. Reason: url broken

  8. #8
    SitePoint Zealot stikkybubble's Avatar
    Join Date
    Sep 2006
    Location
    Pluto
    Posts
    182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A friend of mine has now offered to lend me a book which shows the necessary algorithms so that I (hopefully) won't need actual statistical tables. If I get hold of it, I will post the title here in case anyone else needs something similar.
    Don't worry about being 'off-topic', I'm very fuzzy on the details at the moment. I discovered that most references to statistics and PHP on the web don't get any further than finding 'averages', which is obviously a lot more trivial than the type of stats I am hoping to do.
    Your advice actually sounds very helpful and relevant. Thanks so much!

  9. #9
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Cgrid - by Ricardo Costa

    Classes to help select, reorder data linked to a html table, might come in handy, eveb if its just in your search for ideas on how to display and reorder all that data.

    Good luck


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •