Greenhorn
posted 16 years agook heres the thing i am trying to create a program (in java of course) that will find the mode of ten seperately inputted numbers, no arrays, i hate them and i know theres plent of ways to get around them, anywho im not having any luck, help me please
It can be written without an array for mean and standard deviation; not as certain for median and mode. – duffymo Nov 16 '10 at 10:30 The MODE algorithm is not considering cases with more than one mode (bimodal, trimodal.) - it happens when there is more than one number appearing in the same number of times as maxCount.
- This free calculator determines the mean, median, mode, and range of a given data set. Learn more about the advantages and disadvantages of each of these statistical values and when each should be used, or explore hundreds of other calculators addressing math, finance, health, fitness, and more.
- Java program to calculate mode in Java Java Programming Java8 Object Oriented Programming In statistics math, a mode is a value that occurs the highest numbers of time.
- No, I just want to make a program that calculates mean median and mode. KookieYolo April 28, 2016, 12:29am #15. KookieYolo April 28, 2016, 12:29am #16. Ok, I need help with adding the HTML.
- How to calculate mean, median, and mode in python by creating python functions. Up next, we will be writing a function to compute mean, median, and mode in python. Why Function? To make calculating mean, median, and mode easy, you can quickly write a function that calculates mean, median, and mode.
Ranch Hand
posted 16 years ago
Sheriff
posted 16 years agoDefintion of 'mode' --> The mode of a set of data is the value in the set that occurs most often.
Chase-
So, you're trying to calculate the mode of a set of data, and you don't want to use an array. What have you tried? Where are you having trouble? What part are you not able to 'get'? We'd love to help you, but we're not going to do the work for you. If you'd like to post your code and specifically explain what the problem is -- we'd be more than happy to help you de-bug the problem and maybe even offer some alternative solutions. How's that sound?
In the mean time, Im moving this to Java In General (Beginner) forum, where I think its more appropriate. Good luck!
Chase-
So, you're trying to calculate the mode of a set of data, and you don't want to use an array. What have you tried? Where are you having trouble? What part are you not able to 'get'? We'd love to help you, but we're not going to do the work for you. If you'd like to post your code and specifically explain what the problem is -- we'd be more than happy to help you de-bug the problem and maybe even offer some alternative solutions. How's that sound?
In the mean time, Im moving this to Java In General (Beginner) forum, where I think its more appropriate. Good luck!
How To Find Mean Mode Median
- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
(instanceof Sidekick)
posted 16 years agoTry to think up a solution in relatively plain english. Maybe
Now you have a handful of small problems:
How do you go through your input set?
How do you keep a counter for each number?
Where do you remember the highest counter so far?
Where do you remember the number that got the highest count?
And if you really want to blow your instructor away, show em this: http://www.cs.utexas.edu/users/moore/best-ideas/mjrty/index.html (Shucks, that only works if there is a MAJORITY number, I think)
Have fun! Don't take my word for that plain language algorithm. See if you can do better!
Now you have a handful of small problems:
How do you go through your input set?
How do you keep a counter for each number?
Where do you remember the highest counter so far?
Where do you remember the number that got the highest count?
And if you really want to blow your instructor away, show em this: http://www.cs.utexas.edu/users/moore/best-ideas/mjrty/index.html (Shucks, that only works if there is a MAJORITY number, I think)
Have fun! Don't take my word for that plain language algorithm. See if you can do better!
A good question is never answered. Pinnacle profiler windows 10. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. Rexon heavy duty drill press manual. John Ciardi
Greenhorn
posted 16 years agook there is nothing wrong with the code, but i just have no clue of the formula i am sposed to actually use, that is my only problem, and if you cant help that is fine
Greenhorn
posted 16 years agoim sitting right next to him and here is the problem that he is having he needs to write a program to calculate the code he has the code wrote out he just needs help figuring out the math like should he use a switch statement but the only problem is the user can enter any range of numbers
lowercase baba
posted 16 years agoWhat code do you have written out? What does it do/not do? What part are you having trouble with exactly?
People here love to help, but i'm not sure what your problem is. just telling us 'it doesn't work' doesn't do any good. If the code isn't too long, you can use the code tags and post what you written so far, and someone will probably give you some suggestions.
People here love to help, but i'm not sure what your problem is. just telling us 'it doesn't work' doesn't do any good. If the code isn't too long, you can use the code tags and post what you written so far, and someone will probably give you some suggestions.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors Sybase sql anywhere 12 free download.
Greenhorn
posted 16 years agook he has the input wrote out and what he is having problems with is the math cause he doesnt really know what to do like what system he should use or what so is there anyone that can help him figure out the math part of the program of like what he should do cause the user can enter any number
How To Calculate The Median
lowercase baba
posted 16 years agoi don't know what you mean by 'what system should he use'.
there really isn't a lot of math involved in figuring out the mode. you need to scan all the input values, and count how many times each unique value appears. for example, if the 10 input numbers are:
5,8,2,3,6,5,1,8,0,8
since 8 occurs more than any other number, the mode is 8. the only math involved is simple addition and doing some comparisons (i.e. is one value greater than another).
when you say 'he has the input wrote', is he saving all 10 input numbers, so they can all be accessed later? or is he incrementing a counter for each as it is input?
again, it's much easier to help if you POST THE CODE. there are probably hundreds of ways to do this, but without knowing what path you've started, everybody is just making blind guesses on how to help you get further along.
[ May 11, 2004: Message edited by: fred rosenberger ]
there really isn't a lot of math involved in figuring out the mode. you need to scan all the input values, and count how many times each unique value appears. for example, if the 10 input numbers are:
5,8,2,3,6,5,1,8,0,8
since 8 occurs more than any other number, the mode is 8. the only math involved is simple addition and doing some comparisons (i.e. is one value greater than another).
when you say 'he has the input wrote', is he saving all 10 input numbers, so they can all be accessed later? or is he incrementing a counter for each as it is input?
again, it's much easier to help if you POST THE CODE. there are probably hundreds of ways to do this, but without knowing what path you've started, everybody is just making blind guesses on how to help you get further along.
[ May 11, 2004: Message edited by: fred rosenberger ]
Java Program To Calculate Mean Median Models
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Ranch Hand
posted 16 years agoStan James has already posted pseudocode for the algorithm you can use. Now all you need to do is change it into Java code.
If you still don't understand, please post the code you already have and what problems you've encountered in trying to implement the code. You should also try writing out an explanation, in your native language, of the steps you should take to find the answer. Perhaps it will help to do an example by hand. Then you can more easily see what steps are needed.
HTH
Layne
If you still don't understand, please post the code you already have and what problems you've encountered in trying to implement the code. You should also try writing out an explanation, in your native language, of the steps you should take to find the answer. Perhaps it will help to do an example by hand. Then you can more easily see what steps are needed.
HTH
Layne