How can I calculate various statistics using VB for a data collecting program?

  • Thread starter Thread starter SDNess
  • Start date Start date
  • Tags Tags
    Data Program
Click For Summary

Discussion Overview

The discussion revolves around the development of a data collecting program using Visual Basic (VB) that calculates various statistics from user-inputted data. The focus is on implementing functionalities to compute mean, median, mode, standard deviation, minimum value, maximum value, upper quartile, and lower quartile, with participants sharing their thoughts on programming approaches and transitions to other languages.

Discussion Character

  • Technical explanation
  • Homework-related
  • Debate/contested

Main Points Raised

  • One participant describes their assignment involving the collection of data through a textbox and listbox, mentioning the need for multiple command buttons to perform various statistical calculations.
  • The participant has successfully calculated the mean using a For...Loop and arranged the inputted data chronologically in the listbox, but seeks further ideas for other calculations.
  • For median and mode, the participant suggests using loops to check for repeating values and to find the middle value, respectively.
  • There is uncertainty expressed regarding the implementation of standard deviation, minimum, and maximum value calculations, with some proposed formulas involving the listbox's "listcount" property.
  • Upper and lower quartiles are described as the top and bottom 25% of the data, but the participant does not provide a specific method for calculating them.
  • Another participant inquires about the version of VB being used and offers assistance via email.
  • A later reply indicates that the original poster has completed their VB project and is transitioning to Java, expressing a desire to learn C/C++ and possibly Python in the future.
  • There is a discussion about the benefits of mastering programming languages versus moving between them, with one participant cautioning against spreading oneself too thin across multiple languages.

Areas of Agreement / Disagreement

Participants express varying levels of familiarity and experience with programming languages, and while there is agreement on the importance of mastering languages, there is no consensus on the best approach to learning or transitioning between them.

Contextual Notes

Some calculations remain unresolved, particularly the standard deviation and quartile calculations, with participants not providing definitive methods or solutions. The discussion also reflects differing levels of experience with programming languages.

SDNess
Messages
33
Reaction score
0
Ok, my latest assignment is to collect 8 different "types" of data from a set of inputted data. I am using a textbox for the user to input the data into a listbox by clicking on a command button. So the program will use 1 listbox, 1 textbox, multiple command buttons, and multiple labels (in which I want to display the computted results).

I have to calculate the mean, median, mode, standard deviation, minimum value, maximum value, upper quartile, and lower quartile of the inputted data. Each calcutation has its own command button. So far, I have figured out the mean by using a For...Loop. Easy enough. Also, I've found out how to arrange the inputted data chronologically in the listbox. Visual basic is a little weird when inputting data. I had to make it so that the integers from 1-9 have 0's in front on the left in the ten colum's spot.

Anyway, do you have any ideas that could jumpstart my thinking process. You don't have to program it for me, just tell me if I'm going in the right direction.

Most of the calculations are based off of the list box's "listcount" property or at least that is what I am guessing.

Note: my list box is called lstOrdered
Median - sometype of loop
Mode - similiarly...another loop that cheaks for repeating values?
Stand Dev - totally lost...
Min Val - something including the phrase: (Listcount + 1) - (Listcount) ?
Max Val - something inluding: (Listcount + 1) ?
Up Quartile - the top 25% of the data?
Lo Quartile - the bottom 25% of the data?
 
Computer science news on Phys.org
Hehe thanks for the offer...fortunately I managed to finish it all ready. Are you familiar with Java? Because I've basically finished all of VB and have moved onto Java.
 
you basically finished vb huh. i c that you are running off to java. java is powerful (i am a beginner to it). one thing that you should keep in mind is that if you move around to all of them like this you would know about them all but u will master none. C/C++ and assemble coding is good too.
 
Visual Basic was more of an "introduction" for me. I'm sticking with Java for a while, but am definitely learning C/C++ sometime - most likely during the summer. Java, C, and C++ will suffice I think...maybe Python too.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 2 ·
Replies
2
Views
3K