Current location: Hot Scripts Forums » Programming Languages » PHP » Scoring a Quiz

Scoring a Quiz

Reply
  #1 (permalink)  
Old 07-06-08, 02:58 PM
cesarcesar cesarcesar is offline
Newbie Coder
 
Join Date: Mar 2008
Posts: 76
Thanks: 0
Thanked 1 Time in 1 Post
Scoring a Quiz

I making a personality quiz that goes like the following.

User takes a test to determine which type of person they are more like. So there will be say 5 types, each given a percentage of 100 that they are closest to at quiz end. The test has 50 questions, plus a age question and a sex question. Each test has 5 possible answers. The user clicks through radio button to fill out the quiz. No sweat so far.

My issue is in the test scoring, this is were i get confused. When making a test, each answer is weighted to fit a specific personality type. The weights are shown on screen as +6 thru 0 thru -6. (In code as 1-13, zero the default get 7 points). I have tried a few different scoring algos but non seem to be accurate. One other thing, I have to assume that a value other than zero WILL NOT be chosen when building a quiz.

1st try - Multiple count of all questions times 7 (7 is middle or 0 on scale), then divide by total points gotten from weighted answers. This ends up being something like 350/372 = 94%. This is all good till you get a score like 350/352 = 99%. In percentage you can assume that the second score is higher, but in reality the first score had the greater point spread.

2nd try - Add the highest value (up to 13) from each questions answers together for each personality type, then divide by total points gotten from weighted answers. This ends up something similar to the above try, but with higher percentages going to those personality types with answers that have no weights attached to them.

OK so now that i have written this Im really thinking that the quizzes will not work if weights are not set to other than zero (aka 7 points). Am I totally off here? Can anyone lead me in a proper direction. Thanks much for helping my keep what hair is left on my head.

Cesar
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 07-06-08, 03:36 PM
DAL's Avatar
DAL DAL is offline
Code Master
 
Join Date: Jun 2003
Location: North East England/UK
Posts: 874
Thanks: 0
Thanked 0 Times in 0 Posts
Ive never done a quiz before but Im sure its simple math. Isnt the final score a static number of which you can calculate a percentage from?

Maybe if you start by working with less questions like say 10 then try to get that working. 50 is a long way to go to get some debugging going.

If you really need to envolve some complicated means then its going to be difficult for anyone to help, especially if no code is posted.

I wish you well.

Kind regards
Dal
__________________
"once upon a midnight dreary, while i pron surfed, weak and weary, over many a strange and spurious site of 'hot xxx galore'. While i clicked my fav'rite bookmark, suddenly there came a warning, and my heart was filled with mourning, mourning for my dear amour," 'Tis not possible!", i muttered, "give me back my free hardcore!" quoth the server, 404."
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 07-06-08, 03:42 PM
cesarcesar cesarcesar is offline
Newbie Coder
 
Join Date: Mar 2008
Posts: 76
Thanks: 0
Thanked 1 Time in 1 Post
thanks for the reply. this is not so much a code problem, but rather a math problem via code, so there is no code. The amount of questions is not relevant since they are working and tallying fine. Its just im not sure how to get the math right.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 07-06-08, 03:53 PM
DAL's Avatar
DAL DAL is offline
Code Master
 
Join Date: Jun 2003
Location: North East England/UK
Posts: 874
Thanks: 0
Thanked 0 Times in 0 Posts
Oh rite, sorry. Well, I dont mean this in a nasty way but your probably the best person to solve the problem.

I find that sitting down with a bit of paper and pen and working it all out based on simple steps. I would still recommend working with 10 cos writting out 50's going to be a pain plus you dont want to be lost in all of them questions and answers.

You can add the extra 40 to your algorythm later. Logic flow the whole thing 3 times and you should have your answer from my experience.

Maybe someone whos actually done this can help.

Still, I wish you best of luck
Kind regards
Dal
__________________
"once upon a midnight dreary, while i pron surfed, weak and weary, over many a strange and spurious site of 'hot xxx galore'. While i clicked my fav'rite bookmark, suddenly there came a warning, and my heart was filled with mourning, mourning for my dear amour," 'Tis not possible!", i muttered, "give me back my free hardcore!" quoth the server, 404."
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 07-09-08, 06:11 AM
cesarcesar cesarcesar is offline
Newbie Coder
 
Join Date: Mar 2008
Posts: 76
Thanks: 0
Thanked 1 Time in 1 Post
thanks again DAL for your comments. i have done the paper thing and im still not getting the results im looking for.. so this is why i ask to this forum for help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 07-09-08, 03:36 PM
DAL's Avatar
DAL DAL is offline
Code Master
 
Join Date: Jun 2003
Location: North East England/UK
Posts: 874
Thanks: 0
Thanked 0 Times in 0 Posts
50 questions with possible swings of -6 to +6. I take it +6 on every question would equal 100 % and -6 on every question would equal 0%.

7 answers of each question would give
Answer 1 scores 0 pt
Answer 2 scores 1 pt
Answer 3 scores 2 pt
Answer 4 scores 3 pt
Answer 5 scores 4 pt
Answer 6 scores 5 pt
Answer 7 scores 6 pt


Im I right with this so far?
__________________
"once upon a midnight dreary, while i pron surfed, weak and weary, over many a strange and spurious site of 'hot xxx galore'. While i clicked my fav'rite bookmark, suddenly there came a warning, and my heart was filled with mourning, mourning for my dear amour," 'Tis not possible!", i muttered, "give me back my free hardcore!" quoth the server, 404."
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Quiz Algo cesarcesar PHP 1 03-20-08 05:25 PM
Specialized quiz which tallies multiple responses - and has no wrong answers jeremyandrebecca Script Requests 1 02-20-08 04:51 PM
Free Online Interview Practice Tests and Quiz DB_Wiz General Advertisements 0 12-04-05 06:23 AM


All times are GMT -5. The time now is 06:49 PM.
vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.