|
-
Jan 23rd, 2002, 08:05 AM
#1
Thread Starter
Member
Math Probelm
Im trying to figure out a matmatical equation.
If i sent out a questionier to 50 people
and asked how they rated apples on a scale of 1 to 5
and the results came back like this
1 ---- 9
2 ---- 15
3 ---- 18
4 ---- 5
5 ---- 3
How do you determine what the average is?
ie, on average people rated apples 2.5
or whatever the number would be?
OddPrime
MCP
The wild world of geeks
coming soon at:
www.renegadegeeks.com
-
Jan 23rd, 2002, 08:08 AM
#2
Fanatic Member
(1 * 9 + 2 * 15 + 3 * 18 + 4 * 5 + 5 * 3)/50
-
Jan 23rd, 2002, 08:10 AM
#3
Thread Starter
Member
Excelent!
where in Wilmington are you?
Im in Newcastle? off of 141
OddPrime
MCP
The wild world of geeks
coming soon at:
www.renegadegeeks.com
-
Jan 23rd, 2002, 08:11 AM
#4
shouldn't this be in the maths forum?
-
Jan 23rd, 2002, 08:13 AM
#5
Fanatic Member
Originally posted by axion_sa
shouldn't this be in the maths forum?
Probably...
I work in downtown Wilmington, Live outside of Philly.
Last edited by steve65; Jan 23rd, 2002 at 08:42 AM.
This space for rent...
-
Jan 23rd, 2002, 08:19 AM
#6
Thread Starter
Member
Its VB Related.
Code:
Public Function AvgRating() as long
Dim rst as adodb.recordset
Dim lngSum as long
set rst = conn.open("Select Rate, CountOfRate From tblZ1")
While not rst.Eof = True
lngSum = lngSum + (Val(rst.Rate) * Val(rst.CountOfRate))
rst.movenext
Wend
lngSum = lngSum / 50
AvgRating = lngSum
rst.close
set rst = nothing
End Function
OddPrime
MCP
The wild world of geeks
coming soon at:
www.renegadegeeks.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|