1. J

    SPSS-Need help creating a variable for dyadic data

    I have data for 200+ couples, one row per individual. Each couple shares an identifier (their CoupleID) which occupies 1 column. Each couple answered a set of questions about themselves, and the same questions about their partner. Individuals without partners have a blank CoupleID. I need to...
  2. G

    Create a dummy conditional on two other variables

    Hello there, I have data on European Union membership in the form of a dummy variable were eu_o = Origin is a member, eu_d=Destination is a member. I want to create another dummy variable that takes the value of 1 if both eu_o=eu_d=1. Is there a command to do this?
  3. L

    Exponential Distribution Conditional Probability

    Hello, I have been working with Exponential Distribution problems, but have not come across a problem like this one with both Exponential Distribution and Conditional Probabilities: If the lifetime of an electronic equipment follows an Exponential Distribution with parameter 0.1 hour. Given...
  4. D

    Conditional probability

    Hello, I'm having an issue with a problem. I just have no clue how to solve it. A machine part may be selected from any of three manufacturers with probabilities p1 = 0.25, p2 = 0.50, and p3 = 0.25. The probabilities that it will function properly during a specified period of time are 0.2...
  5. M

    conditional independence

    hello, I would like to ask the following: I have 3 random variables X , Y and Z. If I know that X is independent of Y given Z then does this imply that X is independent of Z? thanks !
  6. J

    posterior distribution conditioned on a second parameter

    If you have 2 parameters a and b and a observed data set x, and wish to calculate the posterior distribution of a given b is the following true P(a|b,x) proportional to P(a,b| x) Where proportionality is in a. I had wrote this down somewhere but can't remember why or if it is right...
  7. F

    How to calculate conditional density

    Hi, If we have a bivariate Gaussian dist as N(m, a). m=mean and a=variance. how can we find f(x|y) in terms of m and a? Thanks
  8. J

    Poisson Conditional Probability Question

    Hey Guys I've been racking my brain for ages trying to solve this but I can't seem to get the last step. The question is, given 0<u<t , 0<=k<=n Show that P(X(u) = t | X(t) = u) = (n choose k) (u/t)^k (1-(u/t))^(n-k) I have started by using the law of total probability in that P(A|B) =...
  9. G

    Conditional macro - substitute variable name depending on condition

    I would like to be able to specify the dataset I'm working with e.g., (compute DataSet = 1), and then conditionally define some macros based on the specified DataSet. Then I can run a bunch of syntax and have it use the appropriate macro definitions. For example, below is how I envision it...
  10. E

    Adding a new column in R data frame with values conditional on another column

    Suppose I have the data frame: table<- data.frame(population=c(100, 300, 5000, 2000, 900, 2500), habitat=c(1,2,3,4,5,6)) Now I want to add a new column table$size with the values 1 if population< 500, 2 if 500<=population<1000, 3 if 1000<=population<2000, 4 if 2000<=population<3000, 5 if...
  11. O

    Conditional Multivariate Probability

    So, I got this from my textbook and it makes sense: P_{Y|x}(y)= P(Y=y|X=x) = P_{X,Y}(x, y)/P_X(x) But I'm trying to apply it to this question and I'm struggling. Here's the question: Suppose a die is rolled six times. Let X be the total number of 4’s that occur and let Y be the number of 4’s...
  12. T

    Conditional Probability

    Let A and B be events such that P(A)=0.2, P(B)=0.3, and P(A|B)=0.1. What is P(A|B^c)? (i.e. what is B complement?) Answer is 0.243, but I have no idea how to get it. Thanks. Here is my attempt: P(A^c and B)=P(A^c|B)P(B) =0.9*0.3=0.27 Not sure how to get P(A and B), but I know that I have to...