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
AI Thread Summary
The discussion focuses on calculating various statistics—mean, median, mode, standard deviation, minimum and maximum values, and quartiles—using Visual Basic in a data collection program. The user is utilizing a textbox for input, a listbox for displaying data, and multiple command buttons for each calculation. They have successfully implemented the mean calculation using a For...Loop and arranged the data chronologically in the listbox. The user seeks guidance on implementing the remaining calculations, particularly for standard deviation and quartiles, while also mentioning their transition to learning Java after completing the Visual Basic project. Overall, the conversation highlights the user's progress and their interest in expanding programming skills across multiple 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 definately learning C/C++ sometime - most likely during the summer. Java, C, and C++ will suffice I think...maybe Python too.
 
I came across a video regarding the use of AI/ML to work through complex datasets to determine complicated protein structures. It is a promising and beneficial use of AI/ML. AlphaFold - The Most Useful Thing AI Has Ever Done https://www.ebi.ac.uk/training/online/courses/alphafold/an-introductory-guide-to-its-strengths-and-limitations/what-is-alphafold/ https://en.wikipedia.org/wiki/AlphaFold https://deepmind.google/about/ Edit/update: The AlphaFold article in Nature John Jumper...
Thread 'Urgent: Physically repair - or bypass - power button on Asus laptop'
Asus Vivobook S14 flip. The power button is wrecked. Unable to turn it on AT ALL. We can get into how and why it got wrecked later, but suffice to say a kitchen knife was involved: These buttons do want to NOT come off, not like other lappies, where they can snap in and out. And they sure don't go back on. So, in the absence of a longer-term solution that might involve a replacement, is there any way I can activate the power button, like with a paperclip or wire or something? It looks...

Similar threads

Back
Top