User Name Remember Me? Password

 Algebra Pre-Algebra and Basic Algebra Math Forum

 November 19th, 2013, 05:41 PM #1 Newbie   Joined: Nov 2013 Posts: 1 Thanks: 0 random variable binary tree problem I have this problem on random variables and a binary tree. The problem goes like this: The experiment is creating a binary tree with 4 nodes. The random variable X is the number of leaves. My first question is what can my possible values be for the random variable X? Would it be 1 and 2 since we can't have rooted binary tree that has 4 nodes with 0 leaves? My second question is how would i find the probability of X=1 and X=2? I started with X=1 and drew each possible trees, this seemed like a similar problem where i tossed a coin 4 times and determined the # of heads. But then i realized that this would not work because as X increases we would get a node with 2 leaves. So its not just a matter of left child is 1/2 right child is 1/2 probability. Would we have a 1/3 chance of a getting a left node, 1/3 chance of getting a right node, 1/3 chance of getting both a left and right node since we have 3 possibilities? Since the root is always going to be the same we would have something like 1*1/3*1/3*1/3 which is 1/27. Since there are 8 possible binary trees with 4 nodes and 1 leaf, would P(X=1) = (1/27)^8? November 21st, 2013, 06:00 PM #2 Member   Joined: May 2013 Posts: 34 Thanks: 1 Re: random variable binary tree problem interesting. so here are all the binary trees with 4 nodes and 2 leaves. [spoiler] Code:  o /\ o o / o o /\ o o \ o o /\ o o \ o o /\ o o / o o \ o / \ o o o / o / \ o o [/spoiler] and here are all the binary trees with 4 nodes and 1 leaf. [spoiler] Code:  o / o / o / o o / o / o \ o o / o \ o \ o o / o \ o / o o \ o / o / o o \ o / o / o o \ o \ o / o o \ o \ o \ o [/spoiler] so to answer your first question, yes. x = 1 or x = 2. you can't have x = 3 since you would need at least 5 nodes for that. now as to the probability it all depends on how the randomness is selected. if the goal is to generate either a right node or a left node 1 at a time and then figure out the probability of having 2 leaves, it could be quite complex to figure out the probabilty. if however you're simply selecting a random tree with 4 nodes and want to know wether it has 2 leaves of 1 leaf. then the probabilty is 6/8 or 3/4 Tags binary, problem, random, tree, variable Thread Tools Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Similar Threads Thread Thread Starter Forum Replies Last Post tatausi Algebra 1 December 5th, 2012 12:22 AM lawochekel Algebra 1 April 19th, 2012 12:39 PM frankpupu Advanced Statistics 2 March 1st, 2012 03:45 AM 450081592 Advanced Statistics 3 January 25th, 2012 11:16 PM xiongzi Advanced Statistics 0 March 12th, 2009 06:24 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top

Copyright © 2019 My Math Forum. All rights reserved.       