Questions tagged [mean]

The arithmetic mean (or simply the mean or average when the context is clear) is the central tendency of a collection of numbers. The mean is calculated as the sum of the numbers divided by the size of the collection.

The arithmetic mean, or simply the mean or when the context is clear, is the central tendency of a collection of numbers. The mean is calculated as the sum of the numbers divided by the size of the collection. Besides the arithmetic mean, the geometric mean and the harmonic mean can be calculated as well.

Means apply an equal weight to every member of a collection of numbers. This feature makes means not robust to outlier members. cf.

Source: Wikipedia

3925 questions
1
vote
0 answers

Cannot changing JSON from a mongoDB query unless I copy it into new variable

I've created a MEAN app that returns some JSON, I wanted to create a simple function to change a date field in the JSON before displaying it - however i can only do this if i make a copy of the data into a new variable. Can someone explain why this…
Phil Tutty
  • 11
  • 1
1
vote
1 answer

Plotting multiple means on boxplot in R

I have 3 data sets from 3 different csv files of data and am trying to put them in one boxplot with dots at the mean for each box. All is good until I try to add the means Using the script below, I get the output graph that I want (so this part is…
1
vote
1 answer

MEAN STACK variable comparison

Specimen.find( { filter_fin : filter_spec }, { // Get only the taxonomy stuff "taxonomy.phylum": 1, "taxonomy.class": 1, "taxonomy.order": 1, "taxonomy.family": 1, "taxonomy.genus": 1, …
Paul
  • 33
  • 7
1
vote
0 answers

How to handle comments and posts with mongoose in a mean app

This is my first Stackoverflow post, i'll try to make it simple. I have to build a social network with the mean stack for my school. Pretty amazingg technology but i can't find how to use properly the function population of mongoose for linking…
Drago
  • 58
  • 4
1
vote
1 answer

data.table+r: cumulative mean on a column after sub setting using two other dates columns

I have a data.frame DF with 4 columns given below. DF <- structure(list(Ticker = c("ABC", "ABC", "ABC", "ABC","ABC","ABC","ABC", "ABC", "ABC", "ABC", "ABC", "ABC", "ABC", "ABC","ABC","XYZ", "XYZ", "XYZ", "XYZ", "XYZ", "XYZ", "XYZ", "XYZ","XYZ",…
ykh
  • 37
  • 6
1
vote
1 answer

Taking an average of an array according to another array of indices

Say I have an array that looks like this: a = np.array([0, 20, 40, 30, 60, 35, 15, 18, 2]) and I have an array of indices that I want to average between: averaging_indices = np.array([2, 4, 7, 8]) What I want to do is to average the elements of…
user1654183
  • 4,375
  • 6
  • 26
  • 33
1
vote
3 answers

averaging first 5 data points every year

I am trying to average first 5 data points of "var1" every "year". My data is like as below. Length of each yearly data is not the same. Thanks a lot for your help! :) year var1 2010 1 2010 2 2010 3 2010 4 …
user2928318
  • 549
  • 3
  • 7
  • 20
1
vote
1 answer

Values of stat summary fun mean

I am trying to create a plot to compare running time of different algorithms. By running the below R code, I get the following plot, which I am generally statisfied with. However: It can be hard to read-off values from this graph, is there a way to…
YnkDK
  • 681
  • 9
  • 26
1
vote
1 answer

How can I append a username to my ../profile/ URL so each user has a unique page. -MEAN -Jade

I'm in charge of setting up profile pages for each user. I have set up a way to route through to "../profile/:username", but I cannot figure out how to actually render a unique page for each user. Here is my get from…
Malkintosh
  • 13
  • 2
1
vote
4 answers

Calculating the means of many factor columns in a data frame

I have a data frame with factor columns. Here is a tiny example: dat <- data.frame(one = factor(c("a", "b")), two = factor(c("c", "d"))) I can calculate the means of the numeric values that underlie the factor labels for each…
user1322720
1
vote
1 answer

How do you do an ANOVA with means and standard deviation as values?

I want to check whether there is a difference between three treatment groups with the help of a One-way ANOVA. The values I have for each treatment group are means with standard deviation. Even though I know the values from which the means are…
Joey
  • 11
  • 3
1
vote
2 answers

MEAN stack app on openshift - force Https connection

People, I have been racking my brain for two days straight, here's my situation: I have a mean stack application running on openshift - all good. I got an SSL certificate and key - all good. I uploaded the certificate and key to openshift and I can…
Martin K
  • 346
  • 5
  • 15
1
vote
1 answer

Error search mean and variance of image with opencv

Try to find mean and variance of image. Output is: M = -5.8099e-16 D = -4.97692e-23 Mat _mat = imread("img.jpg",0); _mat.convertTo(mat, CV_32F, 1.0/255, 0); Mat mean, dev; mean.convertTo(mean, CV_32F); dev.convertTo(dev,…
magrif
  • 396
  • 4
  • 20
1
vote
1 answer

how to calculate mean and variance in online learning

how to calculate mean and variance in online learning by matlab? suppose we have a stream of data that each time we receive only 40 of data. i want to update mean and variance of this data set by get each 40 data. I would like every time I get 40…
lida
  • 137
  • 1
  • 9
1
vote
1 answer

Access-Control/Authorization for Edit/Update API endpoints with MEAN stack

In this app, the only user with permission to edit or destroy a post should be the user that created the post. I have a route to authenticate a user to give them a token. I also have a route to verify a token: apiRouter.use(function(req, res, next)…
anon
  • 2,143
  • 3
  • 25
  • 37