How to find the conditional CDF based on observed data in R Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)How to compare observed distribution to sampled distributions, using cumulative distibution function?Product of two independent random variablesHow to calculate simple CDF like Wolfram Alpha, but locally?What is the meaning of the conditional $y|b$How to find conditional distributions from jointHow to find copula-based conditional probability P(U|V>=v)?How to compute the CDF of this random variable?Confidence Intervals of non-normal data with known pdf/cdfEfficient estimation of conditional means from pdf, CDF, & quantile function supplied numericallyHow to relate beta CDF to student-t CDF?

Is grep documentation about ignoring case wrong, since it doesn't ignore case in filenames?

How often does castling occur in grandmaster games?

Performance gap between vector<bool> and array

How to get all distinct words within a set of lines?

Why are vacuum tubes still used in amateur radios?

I want to complete my figure

How were pictures turned from film to a big picture in a picture frame before digital scanning?

A term for a woman complaining about things/begging in a cute/childish way

What order were files/directories outputted in dir?

Why does it sometimes sound good to play a grace note as a lead in to a note in a melody?

Time to Settle Down!

Maximum summed subsequences with non-adjacent items

How much damage would a cupful of neutron star matter do to the Earth?

How can I reduce the gap between left and right of cdot with a macro?

Crossing US/Canada Border for less than 24 hours

What's the meaning of "fortified infraction restraint"?

Update module to run alter command

Disembodied hand growing fangs

How to compare two different files line by line in unix?

How does the secondary effect of the Heat Metal spell interact with a creature resistant/immune to fire damage?

Why is it faster to reheat something than it is to cook it?

Do wooden building fires get hotter than 600°C?

I am having problem understanding the behavior of below code in JavaScript

What initially awakened the Balrog?



How to find the conditional CDF based on observed data in R



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)How to compare observed distribution to sampled distributions, using cumulative distibution function?Product of two independent random variablesHow to calculate simple CDF like Wolfram Alpha, but locally?What is the meaning of the conditional $y|b$How to find conditional distributions from jointHow to find copula-based conditional probability P(U|V>=v)?How to compute the CDF of this random variable?Confidence Intervals of non-normal data with known pdf/cdfEfficient estimation of conditional means from pdf, CDF, & quantile function supplied numericallyHow to relate beta CDF to student-t CDF?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3












$begingroup$


If we have two samples (generally their distribution is not known),say $Xsim N(0,1)$, $Y|Xsim N(X,X^2/2)$. Can we recover the conditional CDF of $Y|X$ based on the observed samples in R?



n=1000
x=rnorm(n)
y=rnorm(n,x,x^2/2)









share|cite|improve this question









$endgroup$











  • $begingroup$
    conditional PDF and CDF can be estimated nonparametrically. There is supposedly at least one package available for those purposes.
    $endgroup$
    – Gary Moore
    5 hours ago










  • $begingroup$
    Thank you for your kind comment! Do you have the reference for the method of nonparametric estimation and the R package?
    $endgroup$
    – J.Mike
    4 hours ago


















3












$begingroup$


If we have two samples (generally their distribution is not known),say $Xsim N(0,1)$, $Y|Xsim N(X,X^2/2)$. Can we recover the conditional CDF of $Y|X$ based on the observed samples in R?



n=1000
x=rnorm(n)
y=rnorm(n,x,x^2/2)









share|cite|improve this question









$endgroup$











  • $begingroup$
    conditional PDF and CDF can be estimated nonparametrically. There is supposedly at least one package available for those purposes.
    $endgroup$
    – Gary Moore
    5 hours ago










  • $begingroup$
    Thank you for your kind comment! Do you have the reference for the method of nonparametric estimation and the R package?
    $endgroup$
    – J.Mike
    4 hours ago














3












3








3





$begingroup$


If we have two samples (generally their distribution is not known),say $Xsim N(0,1)$, $Y|Xsim N(X,X^2/2)$. Can we recover the conditional CDF of $Y|X$ based on the observed samples in R?



n=1000
x=rnorm(n)
y=rnorm(n,x,x^2/2)









share|cite|improve this question









$endgroup$




If we have two samples (generally their distribution is not known),say $Xsim N(0,1)$, $Y|Xsim N(X,X^2/2)$. Can we recover the conditional CDF of $Y|X$ based on the observed samples in R?



n=1000
x=rnorm(n)
y=rnorm(n,x,x^2/2)






r distributions conditional-probability cdf






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked 5 hours ago









J.MikeJ.Mike

1415




1415











  • $begingroup$
    conditional PDF and CDF can be estimated nonparametrically. There is supposedly at least one package available for those purposes.
    $endgroup$
    – Gary Moore
    5 hours ago










  • $begingroup$
    Thank you for your kind comment! Do you have the reference for the method of nonparametric estimation and the R package?
    $endgroup$
    – J.Mike
    4 hours ago

















  • $begingroup$
    conditional PDF and CDF can be estimated nonparametrically. There is supposedly at least one package available for those purposes.
    $endgroup$
    – Gary Moore
    5 hours ago










  • $begingroup$
    Thank you for your kind comment! Do you have the reference for the method of nonparametric estimation and the R package?
    $endgroup$
    – J.Mike
    4 hours ago
















$begingroup$
conditional PDF and CDF can be estimated nonparametrically. There is supposedly at least one package available for those purposes.
$endgroup$
– Gary Moore
5 hours ago




$begingroup$
conditional PDF and CDF can be estimated nonparametrically. There is supposedly at least one package available for those purposes.
$endgroup$
– Gary Moore
5 hours ago












$begingroup$
Thank you for your kind comment! Do you have the reference for the method of nonparametric estimation and the R package?
$endgroup$
– J.Mike
4 hours ago





$begingroup$
Thank you for your kind comment! Do you have the reference for the method of nonparametric estimation and the R package?
$endgroup$
– J.Mike
4 hours ago











2 Answers
2






active

oldest

votes


















2












$begingroup$

You can't determine the CDF from samples, but you can easily get an empirical estimate:



set.seed(1359)
n <- 1000
x <- rnorm(n)
y <- rnorm(n, x, x^2/2)

LM <- lm(y ~ 0 + x) # no intercept because you know this, though usually you won't
coef(LM)


Gives me $hatbeta = 1.076$, or $haty = 1.076 cdot x + epsilon$ (about $1times x$, as you specified).



Similarly, you can get an empirical estimate of the standard deviation you supplied with sd(resid(LM)).




If you don't know anything about their distributions, you could try a non-parametric approach.






share|cite|improve this answer









$endgroup$












  • $begingroup$
    Thank you for your answer! Do you have the reference for the nonparametric approach?
    $endgroup$
    – J.Mike
    4 hours ago


















1












$begingroup$

Finding the conditional distribution of a variable $Y$ conditional on another observed variable $X$ is the entire subject matter of regression analysis (construed in its wide sense to include linear and nonlinear regression models, GLMs, GLMMs, etc.). This is a huge subject and a core part of statistical education. If you would like to learn more about it, I would recommend starting with some material on linear regression analysis, and then building up from there.






share|cite









$endgroup$













    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "65"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f403907%2fhow-to-find-the-conditional-cdf-based-on-observed-data-in-r%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2












    $begingroup$

    You can't determine the CDF from samples, but you can easily get an empirical estimate:



    set.seed(1359)
    n <- 1000
    x <- rnorm(n)
    y <- rnorm(n, x, x^2/2)

    LM <- lm(y ~ 0 + x) # no intercept because you know this, though usually you won't
    coef(LM)


    Gives me $hatbeta = 1.076$, or $haty = 1.076 cdot x + epsilon$ (about $1times x$, as you specified).



    Similarly, you can get an empirical estimate of the standard deviation you supplied with sd(resid(LM)).




    If you don't know anything about their distributions, you could try a non-parametric approach.






    share|cite|improve this answer









    $endgroup$












    • $begingroup$
      Thank you for your answer! Do you have the reference for the nonparametric approach?
      $endgroup$
      – J.Mike
      4 hours ago















    2












    $begingroup$

    You can't determine the CDF from samples, but you can easily get an empirical estimate:



    set.seed(1359)
    n <- 1000
    x <- rnorm(n)
    y <- rnorm(n, x, x^2/2)

    LM <- lm(y ~ 0 + x) # no intercept because you know this, though usually you won't
    coef(LM)


    Gives me $hatbeta = 1.076$, or $haty = 1.076 cdot x + epsilon$ (about $1times x$, as you specified).



    Similarly, you can get an empirical estimate of the standard deviation you supplied with sd(resid(LM)).




    If you don't know anything about their distributions, you could try a non-parametric approach.






    share|cite|improve this answer









    $endgroup$












    • $begingroup$
      Thank you for your answer! Do you have the reference for the nonparametric approach?
      $endgroup$
      – J.Mike
      4 hours ago













    2












    2








    2





    $begingroup$

    You can't determine the CDF from samples, but you can easily get an empirical estimate:



    set.seed(1359)
    n <- 1000
    x <- rnorm(n)
    y <- rnorm(n, x, x^2/2)

    LM <- lm(y ~ 0 + x) # no intercept because you know this, though usually you won't
    coef(LM)


    Gives me $hatbeta = 1.076$, or $haty = 1.076 cdot x + epsilon$ (about $1times x$, as you specified).



    Similarly, you can get an empirical estimate of the standard deviation you supplied with sd(resid(LM)).




    If you don't know anything about their distributions, you could try a non-parametric approach.






    share|cite|improve this answer









    $endgroup$



    You can't determine the CDF from samples, but you can easily get an empirical estimate:



    set.seed(1359)
    n <- 1000
    x <- rnorm(n)
    y <- rnorm(n, x, x^2/2)

    LM <- lm(y ~ 0 + x) # no intercept because you know this, though usually you won't
    coef(LM)


    Gives me $hatbeta = 1.076$, or $haty = 1.076 cdot x + epsilon$ (about $1times x$, as you specified).



    Similarly, you can get an empirical estimate of the standard deviation you supplied with sd(resid(LM)).




    If you don't know anything about their distributions, you could try a non-parametric approach.







    share|cite|improve this answer












    share|cite|improve this answer



    share|cite|improve this answer










    answered 5 hours ago









    Frans RodenburgFrans Rodenburg

    3,6471529




    3,6471529











    • $begingroup$
      Thank you for your answer! Do you have the reference for the nonparametric approach?
      $endgroup$
      – J.Mike
      4 hours ago
















    • $begingroup$
      Thank you for your answer! Do you have the reference for the nonparametric approach?
      $endgroup$
      – J.Mike
      4 hours ago















    $begingroup$
    Thank you for your answer! Do you have the reference for the nonparametric approach?
    $endgroup$
    – J.Mike
    4 hours ago




    $begingroup$
    Thank you for your answer! Do you have the reference for the nonparametric approach?
    $endgroup$
    – J.Mike
    4 hours ago













    1












    $begingroup$

    Finding the conditional distribution of a variable $Y$ conditional on another observed variable $X$ is the entire subject matter of regression analysis (construed in its wide sense to include linear and nonlinear regression models, GLMs, GLMMs, etc.). This is a huge subject and a core part of statistical education. If you would like to learn more about it, I would recommend starting with some material on linear regression analysis, and then building up from there.






    share|cite









    $endgroup$

















      1












      $begingroup$

      Finding the conditional distribution of a variable $Y$ conditional on another observed variable $X$ is the entire subject matter of regression analysis (construed in its wide sense to include linear and nonlinear regression models, GLMs, GLMMs, etc.). This is a huge subject and a core part of statistical education. If you would like to learn more about it, I would recommend starting with some material on linear regression analysis, and then building up from there.






      share|cite









      $endgroup$















        1












        1








        1





        $begingroup$

        Finding the conditional distribution of a variable $Y$ conditional on another observed variable $X$ is the entire subject matter of regression analysis (construed in its wide sense to include linear and nonlinear regression models, GLMs, GLMMs, etc.). This is a huge subject and a core part of statistical education. If you would like to learn more about it, I would recommend starting with some material on linear regression analysis, and then building up from there.






        share|cite









        $endgroup$



        Finding the conditional distribution of a variable $Y$ conditional on another observed variable $X$ is the entire subject matter of regression analysis (construed in its wide sense to include linear and nonlinear regression models, GLMs, GLMMs, etc.). This is a huge subject and a core part of statistical education. If you would like to learn more about it, I would recommend starting with some material on linear regression analysis, and then building up from there.







        share|cite












        share|cite



        share|cite










        answered 9 mins ago









        BenBen

        28.8k233129




        28.8k233129



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Cross Validated!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f403907%2fhow-to-find-the-conditional-cdf-based-on-observed-data-in-r%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Isurus Índice Especies | Notas | Véxase tamén | Menú de navegación"A compendium of fossil marine animal genera (Chondrichthyes entry)"o orixinal"A review of the Tertiary fossil Cetacea (Mammalia) localities in wales port taf Museum Victoria"o orixinalThe Vertebrate Fauna of the Selma Formation of Alabama. Part VII. Part VIII. The Mosasaurs The Fishes50419737IDsh85068767Isurus2548834613242066569678159923NHMSYS00210535017845105743

            Wolfenstein 3D Contents Availability Essential improvements Game data Video settings Input settings Audio settings Network VR support Issues fixed Other information System requirements NotesReferences    3D Realms Wolfenstein 3D pageGOG.com Community DiscussionsGOG.com Support PageSteam Community DiscussionsWolfenstein WikiOfficial websiteAmazon.comBethesda.netGamersGateGOG.comGreen Man GamingHumble StoreSteamweb browser versionWolfenstein 3D: Super UpgradesherehereUltraWolfhereWolfMenuECWolf Wolf4SDL WolfGL WinWolf3d NewWolf BetterWolf Sprite Fix and Rotation Project    Wolfenstein 3D VRSplitWolfWolfenstein 3D VRWolfenstein 3D VRWolfenstein 3D VR4DOS command shellFreeDOS's MORE.COMMacBin themthis shim fileWine regeditRELEASE: QUAKE II + III, WOLFENSTEIN 3D, RETURN TO CASTLE WOLFENSTEIN - GOG.com NewsMac Family - Wolfenstein Wiki - WikiaNerdly Pleasures: How many FPS? - DOS Games and Framerates

            Король Коль Исторические данные | Стихотворение | Примечания | Навигацияверсии1 правкаверсии1 правкаA New interpretation of the 'Artognou' stone, TintagelTintagel IslandАрхивировано