Questions tagged [average]

In mathematics, an average is a measure of the "middle" or "typical" value of a data set. Different types of averages include the arithmetic mean, the median, and the mode.

In the most common case, the data set is a list of numbers. The average of a list of numbers is a single number intended to typify the numbers in the list. If all the numbers in the list are the same, then this number should be used. If the numbers are not the same, the average is calculated by combining the numbers from the list in a specific way and computing a single number as being the average of the list.

Many different descriptive statistics can be chosen as a measure of the central tendency of the data items. These include the arithmetic mean, the median, and the mode. Other statistics, such as the standard deviation and the range, are called measures of spread and describe how spread out the data is.

See also: , ,

5780 questions
1
vote
3 answers

ActiveRecord calculating multiple averages

I have a scores table with both score and time per user. I want to calculate both averages grouped by user. I can successfully calculate one of them but not sure how to do both at once. @scores = SpellingScore.where(:user_id =>…
Tim
  • 2,235
  • 4
  • 23
  • 28
1
vote
2 answers

Total Average, ignoring GROUP BY

I created a query in Microsoft Access such as the one below: SELECT LoanType ,Avg(Loan Amount) ,Avg(Loan Rate) FROM Table1 GROUP BY LoanType The output is as you would expect, the average loan amount and the average loan rate for each loan…
MarioS
  • 262
  • 1
  • 3
  • 12
1
vote
1 answer

MySQL, get averages for all days of the week

I have a table that contains data stored for every hour a spot in my location is unavailable or free. My current query gets the average occupancy / free spots of an entire day: SELECT AVG(sz.occupied), AVG(sz.free) FROM `hourly_cache` AS sz WHERE …
Aran Bins
  • 449
  • 10
  • 20
1
vote
3 answers

How to get the average of a changing array in javascript

This is my first post here. I'm new to Javascript and here's my problem: I have four input fields in html. All the four input fields are not necessary to be filled by the user; one would be enough. Now my question is how to get the average of the…
1
vote
1 answer

AVERAGE using multiple criteria from multiple columns

I need to calculate the average value of a column contain temperature values (column H). The difficult part is that I want to average only specific cells of this column, that meet certain criteria. More specifically, I want to average temperature…
Kon Ath
  • 183
  • 1
  • 2
  • 13
1
vote
1 answer

How to average visible/filtered cells in a range meeting a criteria from another range in VBA Function?

I´m pretty new at this so I ´ve been having some trouble with this code and was hoping to get some help. The goal is to average a range of filtered/visible cells when it meets the criteria of another range2 (which is text). I have the following so…
1
vote
2 answers

PHP session cookies blocked by end user security software

I have an issue with PHP session cookies which is affecting only users of Internet Explorer who are using security software including McAffee, AVG and Norton. Some (but apparently not all) users of IE and these security packages are unable to login…
Matt
  • 31
  • 2
1
vote
4 answers

Get row-,column-averages of matrix from text file

My question is how to get each matrix's average and write it in a new text file. If contents of text is 1 -20 -100 50 60 3 4 -100 -3 -10 5 45 10 -15\n I want to get result like this without using numpy: 1 -20 -100 50 60 avg : -2 3 4 -100 -3 0 …
신은화
  • 3
  • 3
1
vote
2 answers

Plotting the Average Line of multiple lines

Look I'm sure this has been asked before, but I've hit another wall, I would like to plot the average line over multiple lines on a plot. I can't seem to be able to do do it after many hours of attempts. I know it looks lazy and I'm super sorry but…
1
vote
0 answers

HBase SingleColumnValueFilter doesn't work in AggregationClient's avg method

I'm trying to get an average value of some qualifier which is written as BigDecimal type in HBase for key rows with specific prefix. @Test(timeout = 300000) public void testAvgWithFilter() throws Throwable { AggregationClient aClient =…
Michael
  • 11
  • 1
1
vote
1 answer

Pandas dataframe mean values are not the same as Excel average values for the same csv?

I have a csv file that I'm reading, cleaning, and analysing with pandas. I select the relevant data and then create a list of means for each column (which I then use as the new data for a new dataframe). Everything seems to work - however, when I…
jihaneaz
  • 25
  • 3
1
vote
2 answers

Averaging columns in a table - ignoring certain columns

I've the following code which successfully makes an average for all the columns from a table. What I need to do though is ignore certain columns in this equation. Dim totalNumber as Double = 0 Dim count as Integer = 0 For x = 0 To…
Tom
  • 12,776
  • 48
  • 145
  • 240
1
vote
1 answer

Excel - Pivot table not counting missing days in average

I have a pivot table grouping by month and calculating the average of the values. Before grouping, a row of the table would look like that: |1May|2May|3May|4May|5May| XX| 10 | | 10 | | 10 | Note that, for the specific row, data are missing…
RiC
  • 27
  • 7
1
vote
2 answers

Calculating an average in "Rock, Paper, Scissors"

Last night I was thinking to my self about the probability of getting the same outcome in "Rock, Paper, Scissors" 10 times in a row. I worked out how to do that and completed that task but then I wanted to challenge myself a bit, so I wanted to…
Joe
  • 21
  • 2
1
vote
3 answers

MapReduce - how do I calculate relative values (average, top k and so)?

I'm looking for a way to calculate "global" or "relative" values during a MapReduce process - an average, sum, top etc. Say I have a list of workers, with their IDs associated with their salaries (and a bunch of other stuff). At some stage of the…
reduced_
  • 11
  • 1
  • 2
1 2 3
99
100