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 8145203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:35:24+00:00 2026-06-06T13:35:24+00:00

I have a relationship: y = a + b + c I have the

  • 0

I have a relationship:
y = a + b + c

I have the average and standard deviation of a, b and c
and I would like to obtain the probability distribution of y
from this by Monte Carlo simulation.

Is there a function or package or easy way that I can use to do this?

  • 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-06-06T13:35:25+00:00Added an answer on June 6, 2026 at 1:35 pm

    I assume that your are assuming your inputs a,b and c are normally distributed because you say you can define them with mean and standard deviation. If that is the case, you can do this pretty fast without any special package.

     mu.a=33
     mu.b=32
     mu.c=13
     sigma.a=22
     sigma.b=22
     sigma.c=222
    
    n= a.large.number=10^5
    a=rnorm(n,mu.a,sigma.a)
    b=rnorm(n,mu.b,sigma.b)
    c=rnorm(n,mu.c,sigma.c)
    y=a+b+c
    plot(density(y))
    mean(y)
    sd(y)
    

    Make sure to be aware of all the assumptions we are making about y,a,b and c.
    If you want to do something more complex like figure out the sampling variance of the mean of y. Then do this procedure many times collecting the mean and plot it.

    mysimfun=function(n,mu,sigma,stat.you.want='mean') 
       #  mu is length 3 and sigma is too.
    
    {
    n= a.large.number=10^5
        a=rnorm(n,mu[1],sigma[1])
        b=rnorm(n,mu[2],sigma[2])
        c=rnorm(n,mu[3],sigma[3])
        y=a+b+c
        plot(density(y))
    
    
    return(ifelse(stat.you.want=='mean',mean(y),sd(y))
    }
    
    
    mu=c(mu.a,my.b,mu.c)
    sigma=c(sigma.a,sigma.b,sigma.c)
    mi=rep(NA,100)
    

    Then run it in a loop of some sort.

    for(i in 1:100) {mi[i]=mysimfun(10,mu,sigma,stat.you.want='mean') }
    
    par(mfrow=c(2,1)
    hist(mi)
    plot(density(mi))
    
    mean(mi)
    sd(mi)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a relationship like this: class E { string name hasMany = [me:ME]
I'm using Hibernate with JPA and have a relationship that looks like this: public
I am working with Expression Engine 2.1 and would like to have a relationship
I have a relationship like this class User include Mongoid::Document include Mongoid::Timestamps embeds_one :setting
I have a relationship like this class Foo { static hasMany = [bars: Bar,
Is it possible to have a relationship from a user table to a system
I have a to-many relationship in my data model, and I'd like to get
I have this relationship in a Rails app class Folder has_many :elements end class
I have this relationship : a user can have zero or one dog, but
I have a typed dataset with two tables like this: Table A (Parent Table)

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.