Skip to content

Instantly share code, notes, and snippets.

View Divyosmi's full-sized avatar
🛩️
Let's #code

Divyosmi Goswami Divyosmi

🛩️
Let's #code
View GitHub Profile

If you are trying to prove the independence of $\overline X$ and $S^2$ via change of variables, suggest you using an orthogonal transformation for ease of calculation. The result can be proved without finding the joint pdf of $(\overline X,S^2)$ and showing they are independent because the joint pdf factors as the product of two marginals.

Consider the transformation $$(X_1,X_2,\ldots,X_n)\to(Y_1,Y_2,\ldots,Y_n)$$ such that $$\begin{pmatrix}Y_1\Y_2\\vdots\Y_n\end{pmatrix}=Q\begin{pmatrix}X_1\X_2\\vdots\X_n\end{pmatrix}$$

, where $Q$ is an $n\times n$ orthogonal matrix with the first row $$\left(\frac{1}{\sqrt{n}},\frac{1}{\sqrt{n}},\ldots,\frac{1}{\sqrt{n}}\right)$$

Then, $$Y_1=\frac{1}{\sqrt{n}}\sum_{i=1}^n X_i=\sqrt{n}\overline X \quad\text{ and }\quad\sum_{i=1}^n Y_i^2=\sum_{i=1}^n X_i^2$$

Clearly, $$(X_1,X_2,\ldots,X_n)\in\mathbb R^n\implies (Y_1,Y_2,\ldots,Y_n)\in\mathbb R^n $$

Countries and areas Total Male Female
Afghanistan 21 23 20
Albania 3 4 3
Algeria 4 5 4
Andorra
Angola 19 17 20
Anguilla
Antigua and Barbuda
Argentina
Armenia 4 5 3
index place 2001 2011 1971 1981 1991 2001
1 Andaman & Nicobar Island 1960 999 572 1309 1265 1960
2 Andhra Pradesh 1363339 404851 1627492 1951312 1661940 1363339
3 Arunachal Pradesh 18482 5766 17925 17950 12395 18482
4 Assam 351416 99512 239349 327598 351416
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
void main() {
print("hi");
dynamic x = 1;
print(x);
x = "hi 2";
print(x);
@Divyosmi
Divyosmi / test.py
Last active February 19, 2021 18:27
from tensorflow import keras
model = keras.model.load_model("./model.h5")
age = int(input("age: input age(only numbers) "))
sex = int(input("sex: input 1 for female and 0 for male(only numbers "))
cp = int(input("cp: input 0 for Asymptomatic, 1 for Atypical Angina, 2 for Nonanginal Pain, 3 for Typical Angina(only numbers) "))
trestbps = int(input("trestbps: input trestbps(only numbers) "))
chol = int(input("chol: input cholesterol(only numbers) "))
fbs= int(input("fbs: input 1 for True and 0 for False(only numbers "))
restecg=int(input("restecg: input 0 for Having ST-T wave abnormal, 1 for Hypertrophy, 2 for Normal(only numbers) "))
thalach = int(input("thalach: input thalach(only numbers) "))
@Divyosmi
Divyosmi / wallet.py
Created January 27, 2021 17:47
The wallet for a bussiness with dummy bitcoin
import datetime
welcome = "welcome to Urja Flower Wallet"
import hashlib
import time
class Block:
import hashlib
import time
class Block:
def __init__(self, index, proof_no, prev_hash, data, timestamp=None):
self.index = index
@Divyosmi
Divyosmi / model.json
Created November 26, 2020 09:33
The model that can classify 104+ unidentifiable flowers
{\"class_name\": \"Sequential\", \"config\": {\"name\": \"sequential\", \"layers\": [{\"class_name\": \"Model\", \"config\": {\"name\": \"vgg16\", \"layers\": [{\"class_name\": \"InputLayer\", \"config\": {\"batch_input_shape\": [null, 512, 512, 3], \"dtype\": \"float32\", \"sparse\": false, \"ragged\": false, \"name\": \"input_1\"}, \"name\": \"input_1\", \"inbound_nodes\": []}, {\"class_name\": \"Conv2D\", \"config\": {\"name\": \"block1_conv1\", \"trainable\": false, \"dtype\": \"float32\", \"filters\": 64, \"kernel_size\": [3, 3], \"strides\": [1, 1], \"padding\": \"same\", \"data_format\": \"channels_last\", \"dilation_rate\": [1, 1], \"activation\": \"relu\", \"use_bias\": true, \"kernel_initializer\": {\"class_name\": \"GlorotUniform\", \"config\": {\"seed\": null}}, \"bias_initializer\": {\"class_name\": \"Zeros\", \"config\": {}}, \"kernel_regularizer\": null, \"bias_regularizer\": null, \"activity_regularizer\": null, \"kernel_constraint\": null, \"bias_constraint\": null}, \"name\": \"block1_conv1\
@Divyosmi
Divyosmi / vgg16.py
Created November 26, 2020 05:50
vgg16 neural net
"""VGG16 model for Keras.
# Reference
- [Very Deep Convolutional Networks for Large-Scale Image Recognition](
https://arxiv.org/abs/1409.1556) (ICLR 2015)
"""
from __future__ import absolute_import
from __future__ import division