Answer:
The probability that you have the disease, given that your test is positive is ≈ 0.0098
Explanation:
This is a conditional probability problem.
Let P(A|B) denote the conditional probability of A given B and it satisfies the equation
- (1) P(A|B) = P(A) × P(B|A) / P(B)
We have the the probabilities:
- P(Testing Positive | Having Disease) =0.99
- P(Testing Negative | Not Having Disease) =0.99
- P(Testing Positive | Not Having Disease) = 1-0.99=0.01
- P(Having Disease) = 0.0001 (striking only one in 10,000 people)
- P(Not Having Disease)= 1 - 0.0001 = 0.9999
<u>We can calculate</u>:
P(Testing Positive) =
P(Having Disease) × P(Testing Positive | Having Disease) + P(Not Having Disease) × P(Testing positive | Not Having Disease ) = 0.0001×0.99 + 0.9999×0.01 =0.010098
<u>from </u><u>(1) </u><u>we have the equation</u>:
P(Having Disease|Testing Positive)=P(Having Disease) × P(Testing Positive | Having Disease)/ P(Testing Positive) = 0.0001×0.99/0.010098≈0.0098
Thus, the probability that you have the disease, given that your test is positive is ≈ 0.0098
Answer:
C++ code explained below
Explanation:
#include<bits/stdc++.h>
#include <iostream>
using namespace std;
int FiboNR(int n)
{
int max=n+1;
int F[max];
F[0]=0;F[1]=1;
for(int i=2;i<=n;i++)
{
F[i]=F[i-1]+F[i-2];
}
return (F[n]);
}
int FiboR(int n)
{
if(n==0||n==1)
return n;
else
return (FiboR(n-1)+FiboR(n-2));
}
int main()
{
long long int i,f;
double t1,t2;
int n[]={1,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75};
cout<<"Fibonacci time analysis ( recursive vs. non-recursive "<<endl;
cout<<"Integer FiboR(seconds) FiboNR(seconds) Fibo-value"<<endl;
for(i=0;i<16;i++)
{
clock_t begin = clock();
f=FiboR(n[i]);
clock_t end = clock();
t1=double(end-begin); // elapsed time in milli secons
begin = clock();
f=FiboNR(n[i]);
end = clock();
t2=double(end-begin);
cout<<n[i]<<" "<<t1*1.0/CLOCKS_PER_SEC <<" "<<t2*1.0/CLOCKS_PER_SEC <<" "<<f<<endl; //elapsed time in seconds
}
return 0;
}
Answer:
Specifies that no mathematical operation will be applied to the copied data. Adds the copied data to the data in the destination cell or range of cells. Subtracts the copied data from the data in the destination cell or range of cells.
...