Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7441459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:00:59+00:00 2026-05-29T11:00:59+00:00

I have 4 populations with known means and standard deviations. I would like to

  • 0

I have 4 populations with known means and standard deviations. I would like to know the grand mean and grand sd. The grand mean is obviously simple to calculate, but R has a handy utility function, weighted.mean(). Does a similar function exist for combining standard deviations?

The calculation is not complicated, but an existing function would make my code cleaner and easier to understand.

Bonus question, what tools do you use to search for functions like this? I know it must be out there, but I’ve done a lot of searching and can’t find it. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T11:00:59+00:00Added an answer on May 29, 2026 at 11:00 am

    Are the populations non overlapping?

    library(fishmethods)
    combinevar
    

    For instance the example in wikipedia would work like this:

    xbar <- c(70,65)
    s<-c(3,2)
    n <- c(1,1)
    combinevar(xbar,s,n)
    

    and standard deviation would be sqrt(combinevar(xbar,s,n)[2])

    if you don’t want to download the library the function goes like this:

    combinevar <- 
    function (xbar = NULL, s_squared = NULL, n = NULL) 
    {
        if (length(xbar) != length(s_squared) | length(xbar) != length(n) | 
            length(s_squared) != length(n)) 
            stop("Vector lengths are different.")
        sum_of_squares <- sum((n - 1) * s_squared + n * xbar^2)
        grand_mean <- sum(n * xbar)/sum(n)
        combined_var <- (sum_of_squares - sum(n) * grand_mean^2)/(sum(n) - 
            1)
        return(c(grand_mean, combined_var))
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to have a class that handles population of lists of data
Suppose I have no network card installed on my computer, and I would like
I have a huge data set with genotypic information from different populations. I would
I have so many issues with my project, i really don't know where to
i don't know whether this question makes sense but still.. If i created an
I know that it is poor programming and architecture when you have a class
I am populating a UITableView with cells containing a UIImageView subview. I would like
I have a dictionary in python like this: x = {country:{city:population}:......} and I want
Ok. I have an attribute in an xml document that I know will occur
I have little working knowledge of python. I know that there is something called

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.