assume that 30% of all plants in a field are infested with aphids. suppose that you pick 2 plants at random. what is the probability that exactly one of them carried aphids?
It depends on how many plants are in the field
that's the question. i got 0.49
0.3= infested and 0.7=not infested
so i did 1-0.7^2=1-0.51=0.49
So how many plants are there in total in the field. This is needed to calculate the probability
it doesn't say how many plants are in the field
it gives u 30% of the plants are infested which means that 70% of the plants are not infested
so in that field which an unknown amount of plants it's asking for the probability that exactly one of them carried aphids.
Is this out of a text book?
yes
it's an even number question and has no answers so i just wanted to be sure that i'm doing it right
I'm writing a program to test different plant numbers and get the probability...
ok. thank you :)
Definitely needs plant numbers: In a field with 10 plants the probability is 0.4666666666666667 with 21/45 combinations carrying 1 aphid infested plant In a field with 100 plants the probability is 0.42424242424242425 with 2100/4950 combinations carrying 1 aphid infested plant In a field with 100 plants the probability is 0.42042042042042044 with 210000/499500 combinations carrying 1 aphid infested plant So it depends. Would you like to verify the code (if you understand it)
sure
thanks
Sure you would like to verify it? OK: public class PlantsInField { public static void main(String[] args) { int limit = 1000; double prob = 0; double total = calcTotal(limit); for (int A = 1; A <= limit; A++) { for (int B = A + 1; B <= limit; B++) { int x = 0; int y = 0; if (A <= limit * 0.3) x = 1; if (B <= limit * 0.3) y = 1; if ((x^y) == 1) { prob += 1; } } } System.out.println(prob+"/"+total); prob /= total; System.out.println(prob); } static int calcTotal(int N) { int n = N; int product = 1; for (; n >= N - 1; n--) { product *= n; } return product / 2; } }
that's fine. i don't understand programming. Thank you though :)
Sure thing
Join our real-time social learning platform and learn together with your friends!