Skip to content

Commit

Permalink
Merge pull request #9 from virtual-labs/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
singhshakti182 authored Aug 17, 2024
2 parents 1a7939d + 46313d3 commit 02e8e34
Show file tree
Hide file tree
Showing 26 changed files with 31,534 additions and 52 deletions.
2 changes: 1 addition & 1 deletion experiment/aim.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
### Aim of the experiment
The aim of the experiment is to model and analyze the relationship between a dependent variable and one or more independent variables, facilitating prediction and understanding of their associations.
17 changes: 17 additions & 0 deletions experiment/contributors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
### Contributors List

<!-- Remove all lines above this line before making changes to the file -->
### Subject Matter Experts
| SNo. | Name | Email | Institute | ID |
| :---: | :---: | :---: | :---: | :---: |
| 1 | Dr. S. Dharmaraja | dharmar@maths.iitd.ac.in | Indian Institute of Technology Delhi | 15984 |
| 2 | Dr. Vidyottama Jain | vidyottama.jain@curaj.ac.in | Central University of Rajasthan | 131042 |



### Developers
| SNo. | Name | Email | Institute | ID |
| :---: | :---: | :---: | :---: | :---: |
| 1 | Anisha | maz188445@iitd.ac.in | Indian Institute of Technology Delhi | 2018MAZ8445 |
| 2 | Shakti Singh | maz208241@iitd.ac.in | Indian Institute of Technology Delhi | 2020MAZ8241 |

2 changes: 1 addition & 1 deletion experiment/experiment-name.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
## Experiment name
## Regression
93 changes: 72 additions & 21 deletions experiment/posttest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,89 @@
"version": 2.0,
"questions": [
{
"question": "This is a Sample Question 1?",
"question": "Consider a dataset with X values [2, 4, 6, 8] and corresponding Y values [5, 9, 12, 15]. What is the slope (β₁) of the simple linear regression line for this data?",
"answers": {
"a": "answer1",
"b": "answer2",
"c": "answer3",
"d": "answer4"
"a": "1.5",
"b": "2.5",
"c": "3.0",
"d": "4.0"
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2",
"c": "Explanation 2",
"d": "Explanation 2"
"a": "Incorrect. Please check the calculation for the slope with the given dataset.",
"b": "Correct. Using the formula for simple linear regression slope: β₁ = 2.5 ",
"c": "Incorrect. Please check the calculation for the slope with the given dataset.",
"d": "Incorrect. Please check the calculation for the slope with the given dataset."
},
"correctAnswer": "a",
"difficulty": "beginner"
"correctAnswer": "b",
"difficulty": "intermediate"
},
{
"question": "This is a Sample Question 2?",
"question": "A multiple linear regression model predicts sales (Y) based on two independent variables: advertising expenditure (X₁ in $1000s) and number of salespeople (X₂). If the model equation is Y = 2X₁ + 3X₂ - 10 , and a new data point has X₁ = 5 and X₂ = 8 , what is the predicted sales?",
"answers": {
"a": "answer1",
"b": "answer2",
"c": "answer3",
"d": "answer4"
"a": "11",
"b": "17",
"c": "15",
"d": "18"
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2",
"c": "Explanation 2",
"d": "Explanation 2"
"a": "Incorrect. Please substitute the given values into the regression equation and recalculate.",
"b": "Correct. Substituting X₁ = 5 and X₂ = 8 into the regression equation: Y = 2(5) + 3(8) - 10 = 17 .",
"c": "Incorrect. Please check the calculation with the given values.",
"d": "Incorrect. Please check the calculation with the given values."
},
"correctAnswer": "b",
"difficulty": "intermediate"
},
{
"question": "Consider a dataset with X values [3, 5, 7, 9] and corresponding Y values [10, 12, 9, 14]. What is the coefficient of determination (R²) for the simple linear regression model fitted to this data?",
"answers": {
"a": "0.56",
"b": "0.64",
"c": "0.72",
"d": "0.81"
},
"explanations": {
"a": "Incorrect. Please recheck the calculation for R² using the given dataset.",
"b": "Incorrect. Please recheck the calculation for R² using the given dataset.",
"c": "Incorrect. Please recheck the calculation for R² using the given dataset.",
"d": "Correct. R² can be calculated using the formula: R² = 1 - SSR/SST, where SSR is the sum of squared residuals and SST is the total sum of squares. In this case, R² = 1 - 34/180 = 0.81 ."
},
"correctAnswer": "d",
"difficulty": "intermediate"
},
{
"question": "A researcher conducts a regression analysis between the number of hours studied (X) and the score obtained in an exam (Y) for a sample of 20 students. The resulting regression equation is Y = 5X + 30. If a student studies for 8 hours, what is the predicted exam score?",
"answers": {
"a": "65",
"b": "70",
"c": "85",
"d": "90"
},
"explanations": {
"a": "Incorrect. Please check the calculation for the predicted score with the given regression equation.",
"b": "Correct. Substituting X = 8 into the regression equation: Y = 5(8) + 30 = 70 .",
"c": "Incorrect. Please check the calculation for the predicted score with the given regression equation.",
"d": "Incorrect. Please check the calculation for the predicted score with the given regression equation."
},
"correctAnswer": "b",
"difficulty": "intermediate"
},
{
"question": "A dataset of 15 samples shows a correlation coefficient (r) of -0.68 between two variables X and Y. What does this value indicate about their relationship?",
"answers": {
"a": "A moderate positive linear relationship.",
"b": "A strong positive linear relationship.",
"c": "A moderate negative linear relationship.",
"d": "A strong negative linear relationship."
},
"explanations": {
"a": "Incorrect. A negative correlation coefficient indicates a negative relationship.",
"b": "Incorrect. A negative correlation coefficient indicates a negative relationship.",
"c": "Correct. A correlation coefficient of -0.68 indicates a moderate negative linear relationship.",
"d": "Incorrect. A negative correlation coefficient indicates a negative relationship, not necessarily strong."
},
"correctAnswer": "c",
"difficulty": "beginner"
"difficulty": "intermediate"
}
]
}
89 changes: 70 additions & 19 deletions experiment/pretest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,89 @@
"version": 2.0,
"questions": [
{
"question": "This is a Sample Question 1?",
"question": "What is the primary purpose of regression analysis in statistics?",
"answers": {
"a": "answer1",
"b": "answer2",
"c": "answer3",
"d": "answer4"
"a": "To calculate the mean of a dataset.",
"b": "To model and analyze the relationship between a dependent variable and one or more independent variables, facilitating prediction and understanding of their associations.",
"c": "To find the mode of a dataset.",
"d": "To perform hypothesis testing."
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2",
"c": "Explanation 2",
"d": "Explanation 2"
"a": "Incorrect. Calculating the mean is not the primary purpose of regression analysis.",
"b": "Correct. Regression analysis models and analyzes the relationship between variables for prediction and understanding.",
"c": "Incorrect. Finding the mode is not the primary purpose of regression analysis.",
"d": "Incorrect. Hypothesis testing is a different statistical concept."
},
"correctAnswer": "a",
"correctAnswer": "b",
"difficulty": "beginner"
},
{
"question": "This is a Sample Question 2?",
"question": "In a simple linear regression equation Y = β₀ + β₁X + ε, what does β₀ represent?",
"answers": {
"a": "answer1",
"b": "answer2",
"c": "answer3",
"d": "answer4"
"a": "The error term.",
"b": "The slope of the line.",
"c": "The intercept (the value of Y when X is 0).",
"d": "The variance of the dataset."
},
"explanations": {
"a": "Explanation 1 <a href='www.google.com'>here</a>",
"b": "Explanation 2",
"c": "Explanation 2",
"d": "Explanation 2"
"a": "Incorrect. β₀ represents the intercept, not the error term.",
"b": "Incorrect. The slope is represented by β₁.",
"c": "Correct. β₀ is the intercept, representing the value of Y when X is 0.",
"d": "Incorrect. β₀ is not related to the variance of the dataset."
},
"correctAnswer": "c",
"difficulty": "beginner"
},
{
"question": "What does the coefficient of determination (R²) indicate in regression analysis?",
"answers": {
"a": "It measures the strength of the relationship between the independent and dependent variables.",
"b": "It quantifies the proportion of the variance in the dependent variable that is predictable from the independent variables.",
"c": "It calculates the sum of squares of residuals.",
"d": "It determines the p-value of the regression equation."
},
"explanations": {
"a": "Incorrect. While R² measures relationship strength, its primary purpose is different.",
"b": "Correct. R² quantifies the proportion of variance in the dependent variable predictable from independent variables.",
"c": "Incorrect. R² is not related to the sum of squares of residuals.",
"d": "Incorrect. R² is not used to determine the p-value."
},
"correctAnswer": "b",
"difficulty": "beginner"
},
{
"question": "What are residuals in the context of regression analysis?",
"answers": {
"a": "The independent variables in the regression equation.",
"b": "The predicted values of the dependent variable.",
"c": "The differences between the observed and predicted values of the dependent variable.",
"d": "The intercept of the regression equation."
},
"explanations": {
"a": "Incorrect. Residuals are not the independent variables.",
"b": "Incorrect. Predicted values are not residuals.",
"c": "Correct. Residuals are the differences between observed and predicted values of the dependent variable.",
"d": "Incorrect. The intercept is represented by β₀ in the regression equation."
},
"correctAnswer": "c",
"difficulty": "beginner"
},
{
"question": "What is a key assumption in regression analysis regarding residuals?",
"answers": {
"a": "Residuals must be perfectly correlated with the independent variables.",
"b": "Residuals should have a mean of zero.",
"c": "Residuals must be equal to the observed values.",
"d": "Residuals should follow a perfect linear pattern."
},
"explanations": {
"a": "Incorrect. Perfect correlation with independent variables is not a requirement for residuals.",
"b": "Correct. A mean of zero indicates accurate predictions on average.",
"c": "Incorrect. Residuals are the differences between observed and predicted values.",
"d": "Incorrect. Perfect linearity is not necessary for residuals."
},
"correctAnswer": "b",
"difficulty": "beginner"
}
]
}
29 changes: 28 additions & 1 deletion experiment/procedure.md
Original file line number Diff line number Diff line change
@@ -1 +1,28 @@
### Procedure
##### In order to perform the experiment, one needs to go through the following steps sequentially:

###### Step 1: Select Type of Sample Data
In the simulation step, choose between Bivariate or Bivariate Grouped data.

#### Part 1: Bivariate Data
###### Step 1.1: Enter the Number of Samples
Input the number of samples or observations collected.

###### Step 1.2: Enter Sample Data
Enter the sample data for each variable.

###### Step 1.3: View Graphical Representation and Regression Result
After entering the sample data, you can view the graphical representation of the selected sample data and the result for the regression. This includes observing the graph and analyzing the regression equation and coefficients.

#### Part 2: Bivariate Grouped Data
###### Step 2.1: Enter the Number of Samples
Specify the number of samples or observations collected.

###### Step 2.2: Enter Sample Data in Terms of Interval
Input the sample data in terms of intervals for each variable.

###### Step 2.3: Create and Set Frequency Table
Create and set the frequency table for the selected sample data, indicating the frequency of occurrence for each interval.

###### Step 2.4: View Regression Result
Click on the "Linear Regression" button to perform linear regression analysis based on the provided grouped data. The result for the regression, including the regression equation and coefficients, can then be viewed and analyzed.

7 changes: 6 additions & 1 deletion experiment/references.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
### Link your references in here
### Selvamuthu, D., & Das, D. (2018). Introduction to statistical methods, design of experiments and statistical quality control. Singapore: Springer Singapore. [a link] {https://link.springer.com/book/10.1007/978-981-13-1736-1}

### Castañeda, L. B., Arunachalam, V., & Dharmaraja, S. (2012). Introduction to probability and stochastic processes with applications. John Wiley & Sons.[a link]{https://www.wiley.com/en-us/Introduction+to+Probability+and+Stochastic+Processes+with+Applications-p-9781118344972}


## Sheldon Ross, Introduction to Probability and Statistics for Engineers and Scientists, 5th Edition, Academic Press, 2014. [a link]{https://www.pearson.com/store/p/probability-and-statistical-inference-global-edition/P200000004474/9781292062358}
17 changes: 17 additions & 0 deletions experiment/simulation/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page Not Found</title>
<link rel="stylesheet" href="./styles/base.css">
</head>
<body>

<h1 style="margin-top: 5rem;">
404 : Page not Found.
</h1>

</body>
</html>
Loading

0 comments on commit 02e8e34

Please sign in to comment.