Commit db4a90b1 authored by Gamage B.G.N.U's avatar Gamage B.G.N.U

Merge branch 'master' into 'IT17165662'

# Conflicts:
#   app/src/main/java/com/elearning/probabilityandstatisticsanalyserandeducator/dataExtraction/ProbabilityDistributionQuestionComparation.java
#   app/src/main/java/com/elearning/probabilityandstatisticsanalyserandeducator/inputMethod/ProbabilityDistributionsIM.java
parents 12206d8b 30c3afcf
......@@ -42,12 +42,12 @@ public class ExtractData {
}
Iterator it = dataSet.iterator();
System.out.println("datset in extract "+ dataSet.toString());
System.out.println("datset in extract size"+ dataSet.size());
System.out.println("datset in extract "+ counter);
//System.out.println("datset in extract "+ dataSet.toString());
//System.out.println("datset in extract size"+ dataSet.size());
//System.out.println("datset in extract "+ counter);
}
System.out.println("values: "+data);
//System.out.println("values: "+data);
return dataSet;
......
......@@ -23,7 +23,7 @@ public class ExtractValueForRandomVariable {
String data1 = word;
Pattern pattern1 = Pattern.compile("\\b(\\d)+(,(\\d)+)*\\b|\\b(\\d)+(\\s(\\d)+)*\\b|\\b(\\d)+(;(\\d)+)*\\b|\\b(\\d)+(:(\\d)+)*\\b");
Pattern pattern1 = Pattern.compile("(\\b(\\d)+(,(\\d)+)*\\b)|(\\b(\\d)+(\\s(\\d)+)*\\b)|(\\b(\\d)+(;(\\d)+)*\\b)|(\\b(\\d)+(:(\\d)+)*\\b)");
s.replaceAll("\\s","");
List<Pattern> patterns = new ArrayList<>();
......@@ -41,12 +41,12 @@ public class ExtractValueForRandomVariable {
}
Iterator it = randomVariable.iterator();
System.out.println("random variable in extract "+ randomVariable.toString());
System.out.println("randam variable in extract size"+ randomVariable.size());
System.out.println("random variable in extract "+ counter);
//System.out.println("random variable in extract "+ randomVariable.toString());
//System.out.println("random variable in extract size"+ randomVariable.size());
//System.out.println("random variable in extract "+ counter);
}
System.out.println("values: "+data);
//System.out.println("values: "+data);
return randomVariable;
......
......@@ -44,7 +44,7 @@ public class ProbabilityDistributionQuestionComparation {
"Overtime hours,0,1,2,3,4,5,6\n" +
"Probability,0.016,0.075,0.134,0.31,0.23,0.155,0.08\n" +
"Find the standard deviation of the probability distribution. (Round to 1 decimal place as needed.)";
//System.out.println("String b:" + b);
List<String> questions ;
List<String> matchprodiskeyword = new ArrayList<>();
......
......@@ -23,8 +23,8 @@ public class ProbabilityValue {
String data1 = word;
Pattern pattern1 = Pattern.compile("\\b(0(\\.\\d+)?|1\\.0)+(,(0(\\.\\d+)?|1\\.0)+)*\\b|\\b(0(\\.\\d+)?|1\\.0)+(\\s(0(\\.\\d+)?|1\\.0)+)*\\b|\\b(0(\\.\\d+)?|1\\.0)+(;(0(\\.\\d+)?|1\\.0)+)*\\b|\\b(0(\\.\\d+)?|1\\.0)+(:(0(\\.\\d+)?|1\\.0)+)*\\b");
s.replaceAll("\\s","");
Pattern pattern1 = Pattern.compile("(\\b(0(\\.\\d+)?|1\\.0)+(,(0(\\.\\d+)?|1\\.0)+)*\\b)|(\\b(0(\\.\\d+)?|1\\.0)+(\\s(0(\\.\\d+)?|1\\.0)+)*\\b)|(\\b(0(\\.\\d+)?|1\\.0)+(;(0(\\.\\d+)?|1\\.0)+)*\\b)|(\\b(0(\\.\\d+)?|1\\.0)+(:(0(\\.\\d+)?|1\\.0)+)*\\b)");
//s.replaceAll("\\s","");
List<Pattern> patterns = new ArrayList<>();
......@@ -41,12 +41,12 @@ public class ProbabilityValue {
}
Iterator it = probabilityvalue.iterator();
System.out.println("probability value in extract "+ probabilityvalue.toString());
System.out.println("probability value in extract size"+ probabilityvalue.size());
System.out.println("probability value in extract "+ counter);
//System.out.println("probability value in extract "+ probabilityvalue.toString());
//System.out.println("probability value in extract size"+ probabilityvalue.size());
// System.out.println("probability value in extract "+ counter);
}
System.out.println("values: "+data);
//System.out.println("values: "+data);
return probabilityvalue;
......
......@@ -126,7 +126,7 @@ public class StandardDeviationQuestionComparation {
boolean value1 = matcher1.matches();
while (matcher1.find()) {
System.out.println("'" + matcher1.group().trim() + "'");
//System.out.println("'" + matcher1.group().trim() + "'");
extractnumbervalues.add(matcher1.group().trim());
}
......
......@@ -599,10 +599,10 @@ public void showMessege(){
StringdescriptiveQuestions.add(tokens);
//printQuestion[lines] = line;
Log.d("MyActivity", "Just created: " + question);
//Log.d("MyActivity", "Just created: " + question);
}
} catch (IOException e) {
Log.wtf("MyActivity", "Error reading data file on line " + line, e);
//Log.wtf("MyActivity", "Error reading data file on line " + line, e);
e.printStackTrace();
}
finally {
......
......@@ -560,10 +560,10 @@ public class StandardDeviationInputMethod extends AppCompatActivity {
StringstdQuestions.add(tokens);
//printQuestion[lines] = line;
Log.d("MyActivity", "Just created: " + question);
//Log.d("MyActivity", "Just created: " + question);
}
} catch (IOException e) {
Log.wtf("MyActivity", "Error reading data file on line " + line, e);
//Log.wtf("MyActivity", "Error reading data file on line " + line, e);
e.printStackTrace();
} finally {
try {
......
......@@ -18,12 +18,12 @@ D. No, because the sum of the probabilities is not equal to 1"
(a) What is the expectation of the total of all the claims from policies sold by this company?
(b) What is the variance of the total of all the claims from this company's policies?"
"A probability distribution of the number of overtime hours worked in one week per employee is listed below.
Overtime hours,0,1,2,3,4,5,6
Probability,0.016,0.075,0.134,0.31,0.23,0.155,0.08
Overtime hours 0,1,2,3,4,5,6
Probability 0.016,0.075,0.134,0.31,0.23,0.155,0.08
Find the standard deviation of the probability distribution. (Round to 1 decimal place as needed.)"
"A probability distribution of the number of overtime hours worked in one week per employee is listed below.
Overtime hours,0,1,2,3,4,5,6
Probability,0.016,0.075,0.134,0.31,0.23,0.155,0.08"
Overtime hours 0,1,2,3,4,5,6
Probability 0.016,0.075,0.134,0.31,0.23,0.155,0.08"
Find the variance of the probability distribution. (Round to 1 decimal place as needed.)"
"A probability distribution gives us:
A. A distribution of probabilities
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment